3. Logging Configuration Options

3.1. Configuration File

Logging in OpenSER can be configured using the following options. Core options are located at the beginning of the configuration file, before loading modules and any routing block.

  • debug - set log level, this is number between 0 and 9. Default is 0. The higher the number the more information will be written to the log. The default level (if no debug is present in the config file and no -d parameter on the command line) is 2 (L_NOTICE).

  • log_stderror - if set to “yes”, the server will print its debugging information to standard error output. If set to “no”, syslog will be used. Default is “no” (printing to syslog).

  • memlog - debugging level for final memory statistics report. Default is “L_DBG” -- memory statistics are dumped only if “debug” option has higher value.

  • log_facility - is used to specify what type of program is logging the message. Valid values to use with OpenSER are “LOG_LOCAL0” through “LOG_LOCAL7”. See the manual page of syslog for more information.

3.2. Command Line Parameters

The debug level and logging type can be also specified as command line parameters.

  • -E - enable logging to stderr

  • -d - enable debugging mode (multiple -d increase the debug level, e.g., -ddddd)