2. Logging Functions

The OpenSER API offers two functions for printing debug and log messages that can be used when write extensions for OpenSER.

2.1. Log Levels

  • 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.