Loading...
Searching...
No Matches
Debugging Logs

The Sofia-SIP components can output various debugging information.

The detail of the debugging output is determined by the debugging level. The level is usually module-specific and it can be modified by module-specific environment variable. There is also a default level for all modules, controlled by environment variable #SOFIA_DEBUG.

The environment variables controlling the logging and other debug output are as follows:

- #SOFIA_DEBUG Default debug level (0..9)
- #NUA_DEBUG User Agent engine (nua) debug level (0..9)
- #SOA_DEBUG SDP Offer/Answer engine (soa) debug level (0..9)
- #NEA_DEBUG Event engine (nea) debug level (0..9)
- IPTSEC_DEBUG HTTP/SIP autentication module debug level (0..9)
- #NTA_DEBUG Transaction engine debug level (0..9)
- #TPORT_DEBUG Transport event debug level (0..9)
  - #TPORT_LOG If set, print out all parsed SIP messages on transport layer
  - #TPORT_DUMP Filename for dumping unparsed messages from transport
- SU_DEBUG su module debug level (0..9)

The defined debug output levels are:

- 0 SU_DEBUG_0() - fatal errors, panic
- 1 SU_DEBUG_1() - critical errors, minimal progress at subsystem level
- 2 SU_DEBUG_2() - non-critical errors
- 3 SU_DEBUG_3() - warnings, progress messages
- 5 SU_DEBUG_5() - signaling protocol actions (incoming packets, ...)
- 7 SU_DEBUG_7() - media protocol actions (incoming packets, ...)
- 9 SU_DEBUG_9() - entering/exiting functions, very verbatim progress

In addition to the macros mentioned above, there is also functions for printing logging messages:

- su_llog(), su_vllog()
- su_perror(), su_perror2()

The log level can be set (to a level defined in a configuration file, for instance) with following functions

- su_log_set_level(), su_log_soft_set_level()

The log output can be redirected to, e.g., system log or loggin server, with su_log_redirect().

Sofia-SIP 1.12.11devel - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.