HP-UX C SIP Stack Programmer's Guide (Novembery 2007)

352 HP-UX C SIP Stack Programmers Guide
Log Configuration
After setting the log level to the above groups of source identifiers, the
StackMgr will check if any of the specific sources was set to a non-zero log
level. If so, this level will be set for the specific source overriding the default log
level. The RvSipLogFilters enumeration contains a filter for each of the log
message types.
The following filters are available:
RVSIP_LOG_DEBUG_FILTER
RVSIP_LOG_INFO_FILTER
RVSIP_LOG_WARN_FILTER
RVSIP_LOG_ERROR_FILTER
RVSIP_LOG_EXCEP_FILTER
RVSIP_LOG_LOCKDBG_FILTER
RVSIP_LOG_ENTER_FILTER
RVSIP_LOG_LEAVE_FILTER
You can combine these filters to define exactly what log messages each source
will produce. The log can be configured on the SIP Stack construction using the
configuration structure, or at runtime using the RvSipStackSetNewLogFilters()
API function.
Sample Code
The following code demonstrates how to instruct the Call-leg layer to print only
INFO and ERROR messages to the Log.
/*=====================================================================*/
RvSipStackCfg stackCfg;
RvSipStackInitCfg(sizeof(stackCfg), &stackCfg));
stackCfg.callLogFilters = RVSIP_LOG_INFO_FILTER | RVSIP_LOG_ERROR_FILTER;
/======================================================================*/
Sample Code
The following code demonstrates how to set the Log filters for all layers of the
SIP Stack simultaneously. In this sample, each layer is instructed to print INFO,
DEBUG, ERROR, WARN and EXCEP messages to the Log. This is also the
recommended set of prints that will enable you to fully monitor the Stack
activities.
/*==========================================================================*/