|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webmethods.caf.wsclient.logging.LogHandler
public class LogHandler
Log Handler for WSClient. Log events are delivered to registered listeners that implement
the ILogListener
interface. Listeners are registered via the WSClient.addLogListener()
convenience method
Field Summary | |
---|---|
protected ArrayList |
m_listenerList
|
protected static LogHandler |
m_logHandler
|
Constructor Summary | |
---|---|
LogHandler()
|
Method Summary | |
---|---|
void |
addListener(ILogListener listener)
Add a ILogListener implementation to the list of listeners notified when a logging
event is fire. |
void |
fireLogEvent(String category,
String module,
String logMessage)
Fire a logging event, notifying all each of our registered log listeners |
void |
fireLogEvent(String category,
String module,
String logMessage,
Throwable t)
Fire an exception logging event, notifying all each of our registered log listeners |
static LogHandler |
getInstance()
Get the singleton instance of the LogHandler |
static void |
logDebug(String module,
String logMessage)
Convenience method for generating a debug logging message error for the given module |
static void |
logError(String module,
String logMessage)
Convenience method for logging an error for the given module |
static void |
logException(String module,
String logMessage,
Throwable throwable)
Convenience method for generating an error logging message for a given exception |
void |
removeListener(ILogListener listener)
Remove a specific ILogListener implementation from the list of listeners |
static void |
shutdown()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static LogHandler m_logHandler
protected ArrayList m_listenerList
Constructor Detail |
---|
public LogHandler()
Method Detail |
---|
public static LogHandler getInstance()
LogHandler
public static void shutdown()
public void fireLogEvent(String category, String module, String logMessage)
category
- the log category as stringmodule
- the logging module as stringlogMessage
- the message to add to the logpublic void fireLogEvent(String category, String module, String logMessage, Throwable t)
category
- the log category as stringcategory
- the log category as stringmodule
- the logging module as stringlogMessage
- the message to add to the logt
- the thrown exception as Throwablepublic void addListener(ILogListener listener)
ILogListener
implementation to the list of listeners notified when a logging
event is fire.
listener
- the ILogListener
implementation to be notified of logging eventspublic void removeListener(ILogListener listener)
ILogListener
implementation from the list of listeners
listener
- the ILogListener
implementation to be notified of logging eventspublic static void logError(String module, String logMessage)
module
- the module that generated the errorlogMessage
- the error message as stringpublic static void logDebug(String module, String logMessage)
module
- the module that generated the messagelogMessage
- the debug message as stringpublic static void logException(String module, String logMessage, Throwable throwable)
module
- the module that generated the errorlogMessage
- the debug message as stringthrowable
- the exception to be logged
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |