--> change asterisk.conf:
[directories]
astetcdir => /etc/asterisk
astspooldir => /var/spool/asterisk
astvarlibdir => /var/lib/asterisk
astdatadir => /var/lib/asterisk
astlogdir => /var/log/asterisk ; the directory of Asterisk log files, just assign it to the directory we want
astagidir => /var/lib/asterisk/agi-bin
astrundir => /var/run
astmoddir => /usr/lib/asterisk/modules
2. If you want to change the name of log file:
--> change logger.conf:
[logfiles] section
debug => debug
console => notice,warning,error
messages => notice,warning,error ;At present the name of log file is messages. if we want to replace the filesname, just remove this line and replace with a line with different filename, the format is: filename => [log levels] . legal log levels includes: notice, warning, error, debug, verbose .
full => notice,warning,error,verbose
syslog.local0 => notice,warning,error
Level | Description |
verbose | General 'chatter' about what is happening on the system. Verbosity levels greater than 3 display dialplan commands as they are executed. This generates lots of log information |
debug | Debug messages, normally only used by programmers to extract extended information |
notice | Non urgent alert messages |
warning | Warning alert messages, something happened that might be bad. Some tell you how badthe warning is |
error | Error messages, something bad happened – These should be rare. |
3. If you want to rotate the log:
You can rotate logs by running "logger rotate" on the CLI.
You can do this from cron by putting the following in a cron job:
/usr/sbin/asterisk -r -x 'logger rotate'
References:
1. The Little Asterisk Handbook
http://www.automated.it/asterisk/lah-3-6-05_5.html
沒有留言:
張貼留言