Cisco Cisco Computer Telephony Integration Option 8.5 개발자 가이드
Appendix B CTI OS Logging
Logging and Tracing (Java)
B-6
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions Release 7.1(1)
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.
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.
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.
applications. You can 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.
ILogListener interface and provides a default logging mechanism.
The LogWrapper class has three constructors:
•
LogWrapper() - Creates a new LogWrapper object that writes tracing messages
to System.out.
to System.out.
•
LogWrapper(string sFileName) - Creates a new LogWrapper object that writes
trace messages to the file specified in sFileName.
trace messages to the file 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:
iFlushIntervalMs) - 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).
oldest file (the default 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.
need a way to change the trace mask from the default level if necessary to provide
more information for debugging.