| 1 |
; |
| 2 |
; Logging Configuration |
| 3 |
; |
| 4 |
; In this file, you configure logging to files or to |
| 5 |
; the syslog system. |
| 6 |
; |
| 7 |
; "logger reload" at the CLI will reload configuration |
| 8 |
; of the logging system. |
| 9 |
|
| 10 |
[general] |
| 11 |
; |
| 12 |
; Customize the display of debug message time stamps |
| 13 |
; this example is the ISO 8601 date format (yyyy-mm-dd HH:MM:SS) |
| 14 |
; |
| 15 |
; see strftime(3) Linux manual for format specifiers. Note that there is also |
| 16 |
; a fractional second parameter which may be used in this field. Use %1q |
| 17 |
; for tenths, %2q for hundredths, etc. |
| 18 |
; |
| 19 |
;dateformat=%F %T ; ISO 8601 date format |
| 20 |
;dateformat=%F %T.%3q ; with milliseconds |
| 21 |
; |
| 22 |
; |
| 23 |
; This makes Asterisk write callids to log messages |
| 24 |
; (defaults to yes) |
| 25 |
;use_callids = no |
| 26 |
; |
| 27 |
; This appends the hostname to the name of the log files. |
| 28 |
;appendhostname = yes |
| 29 |
; |
| 30 |
; This determines whether or not we log queue events to a file |
| 31 |
; (defaults to yes). |
| 32 |
;queue_log = no |
| 33 |
; |
| 34 |
; Determines whether the queue_log always goes to a file, even |
| 35 |
; when a realtime backend is present (defaults to no). |
| 36 |
;queue_log_to_file = yes |
| 37 |
; |
| 38 |
; Set the queue_log filename |
| 39 |
; (defaults to queue_log) |
| 40 |
;queue_log_name = queue_log |
| 41 |
; |
| 42 |
; When using realtime for the queue log, use GMT for the timestamp |
| 43 |
; instead of localtime. The default of this option is 'no'. |
| 44 |
;queue_log_realtime_use_gmt = yes |
| 45 |
; |
| 46 |
; Log rotation strategy: |
| 47 |
; none: Do not perform any logrotation at all. You should make |
| 48 |
; very sure to set up some external logrotate mechanism |
| 49 |
; as the asterisk logs can get very large, very quickly. |
| 50 |
; sequential: Rename archived logs in order, such that the newest |
| 51 |
; has the highest sequence number [default]. When |
| 52 |
; exec_after_rotate is set, ${filename} will specify |
| 53 |
; the new archived logfile. |
| 54 |
; rotate: Rotate all the old files, such that the oldest has the |
| 55 |
; highest sequence number [this is the expected behavior |
| 56 |
; for Unix administrators]. When exec_after_rotate is |
| 57 |
; set, ${filename} will specify the original root filename. |
| 58 |
; timestamp: Rename the logfiles using a timestamp instead of a |
| 59 |
; sequence number when "logger rotate" is executed. |
| 60 |
; When exec_after_rotate is set, ${filename} will |
| 61 |
; specify the new archived logfile. |
| 62 |
;rotatestrategy = rotate |
| 63 |
; |
| 64 |
; Run a system command after rotating the files. This is mainly |
| 65 |
; useful for rotatestrategy=rotate. The example allows the last |
| 66 |
; two archive files to remain uncompressed, but after that point, |
| 67 |
; they are compressed on disk. |
| 68 |
; |
| 69 |
; exec_after_rotate=gzip -9 ${filename}.2 |
| 70 |
; |
| 71 |
; |
| 72 |
; For each file, specify what to log. |
| 73 |
; |
| 74 |
; For console logging, you set options at start of |
| 75 |
; Asterisk with -v for verbose and -d for debug |
| 76 |
; See 'asterisk -h' for more information. |
| 77 |
; |
| 78 |
; Directory for log files is configures in asterisk.conf |
| 79 |
; option astlogdir |
| 80 |
; |
| 81 |
; All log messages go to a queue serviced by a single thread |
| 82 |
; which does all the IO. This setting controls how big that |
| 83 |
; queue can get (and therefore how much memory is allocated) |
| 84 |
; before new messages are discarded. |
| 85 |
; The default is 1000 |
| 86 |
;logger_queue_limit = 250 |
| 87 |
; |
| 88 |
; Any custom logging levels you may want to use, which can then |
| 89 |
; be sent to logging channels. The maximum number of custom |
| 90 |
; levels is 16, but not all of these may be available if modules |
| 91 |
; in Asterisk define their own. |
| 92 |
;custom_levels = foobar,important,compliance |
| 93 |
; |
| 94 |
[logfiles] |
| 95 |
; |
| 96 |
; Format is: |
| 97 |
; |
| 98 |
; logger_name => [formatter]levels |
| 99 |
; |
| 100 |
; The name of the logger dictates not only the name of the logging |
| 101 |
; channel, but also its type. Valid types are: |
| 102 |
; - 'console' - The root console of Asterisk |
| 103 |
; - 'syslog' - Linux syslog, with facilities specified afterwards with |
| 104 |
; a period delimiter, e.g., 'syslog.local0' |
| 105 |
; - 'filename' - The name of the log file to create. This is the default |
| 106 |
; for log channels. |
| 107 |
; |
| 108 |
; Filenames can either be relative to the standard Asterisk log directory |
| 109 |
; (see 'astlogdir' in asterisk.conf), or absolute paths that begin with |
| 110 |
; '/'. |
| 111 |
; |
| 112 |
; An optional formatter can be specified prior to the log levels sent |
| 113 |
; to the log channel. The formatter is defined immediately preceeding the |
| 114 |
; levels, and is enclosed in square brackets. Valid formatters are: |
| 115 |
; - [default] - The default formatter, this outputs log messages using a |
| 116 |
; human readable format. |
| 117 |
; - [plain] - The plain formatter, this outputs log messages using a |
| 118 |
; human readable format with the addition of function name |
| 119 |
; and line number. No color escape codes are ever printed |
| 120 |
; nor are verbose messages treated specially. |
| 121 |
; - [json] - Log the output in JSON. Note that JSON formatted log entries, |
| 122 |
; if specified for a logger type of 'console', will be formatted |
| 123 |
; per the 'default' formatter for log messages of type VERBOSE. |
| 124 |
; This is due to the remote consoles interpreting verbosity |
| 125 |
; outside of the logging subsystem. |
| 126 |
; |
| 127 |
; Log levels include the following, and are specified in a comma delineated |
| 128 |
; list: |
| 129 |
; debug |
| 130 |
; trace |
| 131 |
; notice |
| 132 |
; warning |
| 133 |
; error |
| 134 |
; verbose(<level>) |
| 135 |
; dtmf |
| 136 |
; fax |
| 137 |
; security |
| 138 |
; <customlevel> |
| 139 |
; |
| 140 |
; Verbose takes an optional argument, in the form of an integer level. The |
| 141 |
; verbose level can be set per logfile. Verbose messages with higher levels |
| 142 |
; will not be logged to the file. If the verbose level is not specified, it |
| 143 |
; will log verbose messages following the current level of the root console. |
| 144 |
; |
| 145 |
; Debug has multiple levels like verbose. However, it is a system wide setting |
| 146 |
; and cannot be specified per logfile. You specify the debug level elsewhere |
| 147 |
; such as the CLI 'core set debug 3', starting Asterisk with '-ddd', or in |
| 148 |
; asterisk.conf 'debug=3'. |
| 149 |
; |
| 150 |
; Special level name "*" means all levels, even dynamic levels registered |
| 151 |
; by modules after the logger has been initialized (this means that loading |
| 152 |
; and unloading modules that create/remove dynamic logger levels will result |
| 153 |
; in these levels being included on filenames that have a level name of "*", |
| 154 |
; without any need to perform a 'logger reload' or similar operation). |
| 155 |
; Note that there is no value in specifying both "*" and specific level names |
| 156 |
; for a filename; the "*" level means all levels. The only exception is if |
| 157 |
; you need to specify a specific verbose level. e.g, "verbose(3),*". |
| 158 |
; |
| 159 |
; We highly recommend that you DO NOT turn on debug mode if you are simply |
| 160 |
; running a production system. Debug mode turns on a LOT of extra messages, |
| 161 |
; most of which you are unlikely to understand without an understanding of |
| 162 |
; the underlying code. Do NOT report debug messages as code issues, unless |
| 163 |
; you have a specific issue that you are attempting to debug. They are |
| 164 |
; messages for just that -- debugging -- and do not rise to the level of |
| 165 |
; something that merit your attention as an Asterisk administrator. Both |
| 166 |
; debug and trace messages are also very verbose and can and do fill up |
| 167 |
; logfiles quickly. This is another reason not to have debug or trace |
| 168 |
; modes on a production system unless you are in the process of debugging |
| 169 |
; a specific issue. |
| 170 |
; |
| 171 |
;debug.log => error,warning,notice,verbose,debug |
| 172 |
;trace.log => trace |
| 173 |
;security.log => security |
| 174 |
console => notice,warning,error |
| 175 |
;console => notice,warning,error,debug |
| 176 |
messages.log => notice,warning,error |
| 177 |
;full.log => notice,warning,error,debug,verbose,dtmf,fax |
| 178 |
; |
| 179 |
;full-json.log => [json]debug,verbose,notice,warning,error,dtmf,fax |
| 180 |
; |
| 181 |
;syslog keyword : This special keyword logs to syslog facility |
| 182 |
; |
| 183 |
;syslog.local0 => notice,warning,error |
| 184 |
; |
| 185 |
; A log level defined in 'custom_levels' above |
| 186 |
;important.log = important |