Cisco Cisco Computer Telephony Integration OS 8.5 Developer's Guide
B-5
CTI OS Developer’s Guide for Cisco Unified ICM/Contact Center Enterprise & Hosted
Release 8.0(1)
Appendix B CTI OS Logging
Logging and Tracing (Java)
Syntax
LogEventsAdapter()
LogEventsAdapter(String fileName)
void startLogging()
void stopLogging()
void processLogEvent(LogEvent e)
void finalize()
Logging and Tracing (Java)
The Java CIL tracing mechanism behaves differently from that of the COM and C++ CILs. The Java CIL
does not automatically create a log file and trace to it. You must develop the custom application to create
and maintain the log file.
does not automatically create a log file and trace to it. You must develop the custom application to create
and maintain the log file.
The Java CIL provides classes that allow you to write tracing messages from CTI applications. You can
create a class that implements ILogListener, register it with the LogManager , and write the trace events to
a log file.
create a class that implements ILogListener, register it with the LogManager , and write the trace events to
a log file.
The Java CIL also includes the LogWrapper class, which implements the ILogListener interface and
provides a default logging mechanism.
provides a default logging mechanism.
The LogWrapper class has three constructors:
•
LogWrapper() - Creates a new LogWrapper object that writes tracing messages to System.out.
•
LogWrapper(string sFileName) - Creates a new LogWrapper object that writes trace messages to the file
specified in sFileName.
specified in sFileName.
•
LogWrapper(string sFileName, long iMaxSize, int iArchives, int iExpires, int iFlushIntervalMs) -
Creates a new LogWrapper object that traces to the file specified in sFileName and sets all the tracing
properties provided:
Creates a new LogWrapper object that traces to the file specified in sFileName and sets all the tracing
properties provided:
–
The maximum size of a single trace file (the default is 2048 Kb)
–
The maximum number of trace files before LoggerManager deletes the oldest file (the default
is 4).
is 4).
If a developer deploys an application and then wants to debug it in the field, they need a way to change
the trace mask from the default level if necessary to provide more information for debugging.
the trace mask from the default level if necessary to provide more information for debugging.
Note
You will also need to provide a way to adjust the trace mask at runtime. If you encounter problems, Cisco
personnel will need to see this log file in order to assist you with your problem.
personnel will need to see this log file in order to assist you with your problem.
See the Java CIL Javadoc file for information on the LogWrapper class and its associated methods.
Logging and Tracing (.NET)
The .NET CIL tracing mechanism behaves differently from that of the COM and C++ CILs. The .NET
CIL does not automatically create a log file and trace to it. You must develop the custom application to
create and maintain the log file.
CIL does not automatically create a log file and trace to it. You must develop the custom application to
create and maintain the log file.
The .NET CIL provides classes that allow you to write tracing messages from CTI applications. Custom
applications can either create their own logging mechanism or use the default logging mechanism
provided in the .NET CIL.
applications can either create their own logging mechanism or use the default logging mechanism
provided in the .NET CIL.