com.ibm.mashups.enabler.logging
Interface LogHandler


public LogHandler

A LogHandler object takes log messages from a Logger and exports them. It might for example, write them to a console or write them to a widget or whatever.


Method Summary
 String getHandlerID()
           Returns the ID of this handler.
 int getLogLevel()
           Get the log level specifying which messages will be logged by this LogHandler.
 void log(String loggerName, int logLevel, String method, String message)
           Method that get's invoked as soon as a subscribed and valid event is published in the logging framework.
 

Method Detail

getHandlerID

String getHandlerID()
Returns the ID of this handler. This ID needs to be unique and must not be null.

Returns:
the ID of this handler.

getLogLevel

int getLogLevel()
Get the log level specifying which messages will be logged by this LogHandler. Message levels lower than this level will be discarded.

Returns:
the level of messages being logged. The returned int needs to be a log level as defined in com.ibm.mashups.enabler.logging.LogLevel.

log

void log(String loggerName,
         int logLevel,
         String method,
         String message)
Method that get's invoked as soon as a subscribed and valid event is published in the logging framework.

Parameters:
loggerName - the name of the logger that published the event.
logLevel - the LogLevel of the published event.
method - the method that caused the event.
message - the message sent by the method


Copyright IBM Corp. 2010 All Rights Reserved.