I remember, from a long time ago, there used to be a sticky or wiki entry on Asterisk Log Collection Instructions. I’ve searched without success until I started writing this post and discovered “Chapter 24.”
I learned a lot from Chapter 24. System Monitoring and Logging: logger.conf
URL: logger.conf
Console Logging:
Note: Setting an integer level via the console will set the level globally affecting any matching, enabled, logging specified in logger.conf
- Turn on PJSIP logging
Console Command:
CLI> pjsip set logger on - Set verbose
Console Command:
CLI> core set verbose 5
Alternately set from CL at startup:
#] asterisk -cvvvvv - Turn on DEBUG and set level
Console Command:
CLI> core set debug 5
Logging to log files configured via logger.conf:
ref: Chapter 24. System Monitoring and Logging: logger.conf
URL: logger.conf
Finally, you must edit /etc/asterisk/logger.conf:
Default should appear as:
messages => notice,warning,error
Append “debug,verbose”
messages => notice,warning,error,debug,verbose
Important Note, you can specify [integer] levels here or via the console, using the above “Append” as an example:
messages => notice,warning,error,debug 5,verbose 5
Important Note: You can also specify level in the console which sets the level globally meaning console level and level for matching setting in logger.conf
Issue the following command to reload logger settings:
CLI> logger reload
Given the amount of time and effort searching and that I came across Chapter 24 only in preparing this article I’m hoping this article helps others more-easily find this information.