The OpenSER API offers two functions for printing debug and log messages that can be used when write extensions for OpenSER.
LOG(level, string, ...) - allow printing messages to different log levels. See the section “Log Levels” for more about the log levels.
level - the level where to print the messages.
string - the string to print. It may contain specifiers in the format of “printf()” C function.
... - further parameters, in case the “string” parameter includes printing specifiers.
DBG(string, ...) - print only debug messages. It is shortcut to LOG(L_DBG, ...).
string - the string to print. It may contain specifiers in the format of “printf()” C function.
... - further parameters, in case the “string” parameter includes printing specifiers.
L_ALERT (-3) - this level should be used if the error requires immediate action.
L_CRIT (-2) - this level should be used if the error is a critical situation.
L_ERR (-1) - this level should be used to report errors during data processing which do not cause system malfunctioning.
L_WARN (1) - this level should be used to write warning messages.
L_NOTICE (2) - this level should be used to report unusual situations.
L_INFO (3) - this level should be used to write informational messages.
L_DBG (4) - this level should be used to write messages for debugging.