Cisco Cisco Computer Telephony Integration Option 9.0 Developer's Guide
B-9
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions Release 7.0(0)
Appendix B CTI OS Logging
Logging and Tracing (.NET)
Step 3
Create a log listener to handle trace events. In the following example, the
AddLogListener method registers the LogEventHandler delegate as a listener for
trace events. The LogManager will send trace events to the method that you pass
to the LogEventHandler.
AddLogListener method registers the LogEventHandler delegate as a listener for
trace events. The LogManager will send trace events to the method that you pass
to the LogEventHandler.
In the following example, the LogManager will send trace events to the
ProcessLogEvent method created in Step 2.
ProcessLogEvent method created in Step 2.
m_log.AddLogListener(new LogManager.LogEventHandler(ProcessLogEvent));
Note
The LogManager only calls the method passed as a parameter to the
LogEventHandler for a particular trace if the trace level for that trace is enabled.
You can use the IsTraceMaskEnabled method in the Logger class to determine
whether or not a trace level is enabled.
LogEventHandler for a particular trace if the trace level for that trace is enabled.
You can use the IsTraceMaskEnabled method in the Logger class to determine
whether or not a trace level is enabled.
Configuring Tracing (Java and .NET)
For the Java and .NET CILs, you can configure tracing either programmatically
by using the LogWrapper class or by editing the TraceConfig.cfg file. Settings in
TraceConfig.cfg will not take effect until LogWrapper.ProcessConfigFile is
called. Your application must call ProcessConfigFile if you have edited the
configuration settings in the TraceConfig.cfg file.
by using the LogWrapper class or by editing the TraceConfig.cfg file. Settings in
TraceConfig.cfg will not take effect until LogWrapper.ProcessConfigFile is
called. Your application must call ProcessConfigFile if you have edited the
configuration settings in the TraceConfig.cfg file.
The All Agents Sample .NET code in the .NET CIL includes a sample
TraceConfig.cfg file and shows how to process that file.
TraceConfig.cfg file and shows how to process that file.