Asterisk-logger.conf

From 탱이의 잡동사니
Revision as of 08:43, 3 October 2016 by Pchero (talk | contribs)
Jump to navigation Jump to search

Overview

Asterisk logger.conf 내용 정리

general

logfiles

로그 파일의 이름과 어떤 내용들이 입력될지를 설정한다. 예외적인 경우로, "console" 지시자는 cli 창으로 나타나는 로그의 레벨을 지정하는 지시어이다.

[logfiles]
;
; Format is "filename" and then "levels" of debugging to be included:
;    debug
;    notice
;    warning
;    error
;    verbose(<level>)
;    dtmf
;    fax
;    security
;
; Special filename "console" represents the root console
;
; Filenames can either be relative to the standard Asterisk log directory
; (see 'astlogdir' in asterisk.conf), or absolute paths that begin with
; '/'.
;
; Verbose takes an optional argument, in the form of an integer level.
; Verbose messages with higher levels will not be logged to the file.  If
; the verbose level is not specified, it will log verbose messages following
; the current level of the root console.
;
; Special level name "*" means all levels, even dynamic levels registered
; by modules after the logger has been initialized (this means that loading
; and unloading modules that create/remove dynamic logger levels will result
; in these levels being included on filenames that have a level name of "*",
; without any need to perform a 'logger reload' or similar operation).
; Note that there is no value in specifying both "*" and specific level names
; for a filename; the "*" level means all levels.  The only exception is if
; you need to specify a specific verbose level. e.g, "verbose(3),*".
;
; We highly recommend that you DO NOT turn on debug mode if you are simply
; running a production system.  Debug mode turns on a LOT of extra messages,
; most of which you are unlikely to understand without an understanding of
; the underlying code.  Do NOT report debug messages as code issues, unless
; you have a specific issue that you are attempting to debug.  They are
; messages for just that -- debugging -- and do not rise to the level of
; something that merit your attention as an Asterisk administrator.  Debug
; messages are also very verbose and can and do fill up logfiles quickly;
; this is another reason not to have debug mode on a production system unless
; you are in the process of debugging a specific issue.
;
;debug => debug
;security => security
console => notice,warning,error
;console => notice,warning,error,debug
messages => notice,warning,error
full => notice,warning,error,debug,verbose,dtmf,fax,security

;syslog keyword : This special keyword logs to syslog facility
;
;syslog.local0 => notice,warning,error
;

위의 설정과 같이 full 로그 파일을 설정한 뒤에, 로그 디렉토리를 확인하면 full 로그 파일이 생성되어 있는 것을 확인할 수 있다.

$ ls -tlr /var/log/asterisk/
total 9060
drwxr-xr-x 2 root root    4096 Sep 30 06:17 cel-custom
drwxr-xr-x 2 root root    4096 Sep 30 06:17 cdr-custom
drwxr-xr-x 2 root root    4096 Sep 30 06:17 cdr-csv
-rw-r--r-- 1 root root    1140 Oct  2 21:30 queue_log
-rw-r--r-- 1 root root  419010 Oct  2 22:08 messages
-rw-r--r-- 1 root root 8828150 Oct  3 08:42 full