Cisco Cisco Computer Telephony Integration Option 8.5 Developer's Guide

Page of 506
   
B-4
CTI OS Developer’s Guide for Cisco Unified Contact Center Enterprise
Release 8.5(1)
Appendix B      CTI OS Logging
Java CIL Logging Utilities
Logger
A custom application that is interested in firing or handling its own LogEvents, can create an instance 
of this class.
Syntax
Logger()
int Trace(long nMsgTraceMask, String message)
long GetTraceMask()
boolean IsTraceMaskEnabled(long nMsgTraceMask)
void addLogListener(ILogEvents logEvents
where logEvents implements the ILogEvents interface.
void removeLogListener(ILogEvents logEvents)
where logEvents implements the ILogEvents interface.
LogEventsAdapter
This is a wrapper class around the Logger facility. A custom application that is interested in tracing but 
doesn’t want to implement its own ILogEvents interface can create an instance of this class. The adapter 
class provides two constructors, a default one that will automatically log to the Java console and one that 
takes in an output filename.
Table B-3
Logger Method Description
Method
Description
Logger
Public constructor of the Logger object.
Trace
Lets the custom app fire a LogEvent
GetTraceMask
Gets the trace mask.
IsTraceMaskEnabled
Determines if a certain trace mask is set.
addLogListener
Subscribe to receive LogEvents.
removeLogListener
Unsubscribe from receiving LogEvents.
Table B-4
LogEventsAdaptor Descriptions
Method
Description
LogEventsAdapter
Public constructor
startLogging
Start receiving LogEvents
stopLogging
Stop receiving LogEvents
processLogEvent
Handles a LogEvent
finalize
Does some cleanup