public class GlueLogListener extends Object implements ILogListener
WriterLogger
to write to the application provided
Writer
.Modifier and Type | Field and Description |
---|---|
static String |
DEBUG |
ERROR, INFO
Constructor and Description |
---|
GlueLogListener() |
Modifier and Type | Method and Description |
---|---|
static electric.util.log.ILogger |
getDefaultLogger()
Get the default
ILogger object that GLUE provides. |
static electric.util.log.ILogger |
getLogger(String name)
Get the
ILogger object registered with the GLUE logging
subsystem with the specified name. |
static boolean |
isLogging(String category)
Check if any registered loggers is logging the specified
category
|
static void |
log(String category,
Object message)
Check if any registered loggers is logging the specified
category and if so, log the message specified.
|
static void |
logDebug(String message)
Log the verbose debug message
|
static void |
logDebug(String module,
String message)
Log the verbose debug message from the specified module.
|
static void |
logError(String message)
Log the error message
|
static void |
logError(String module,
String message)
Log the error message from the specified module.
|
static void |
logException(String message,
Throwable throwable)
Log the Throwable from the specified module.
|
static void |
logException(Throwable throwable)
Log the Throwable from the specified module.
|
static void |
logMapping(String message)
Log the verbose mapping message
|
static void |
logMapping(String module,
String message)
Log the verbose mapping message from the specified module.
|
static void |
logNormal(String message)
Log the normal message
|
static void |
logNormal(String module,
String message)
Log the normal message from the specified module.
|
static void |
logWarning(String message)
Log the warning message
|
static void |
logWarning(String module,
String message)
Log the warning message from the specified module.
|
void |
onLogEvent(String category,
String module,
String logMessage)
Event handler method implementation of the ILogListener interface
Category can be one of
ILogListener.ERROR , ILogListener.DEBUG or ILogListener.INFO |
void |
onLogEvent(String category,
String module,
String logMessage,
Throwable t)
Event handler method implementation of the ILogListener interface
Category can be one of
ILogListener.ERROR , ILogListener.DEBUG or ILogListener.INFO |
static void |
registerLogger(String name,
Writer writer)
Registers a
WriterLogger object with the GLUE logging
subsystem. |
static void |
startLogging(String category)
Start logging the specified category
|
static void |
stopLogging(String category)
Stop logging the specified category
|
public static final String DEBUG
public static void registerLogger(String name, Writer writer) throws Exception
WriterLogger
object with the GLUE logging
subsystem. This is necessary only when an application needs to
have a ILogger
that writes to a specific Writer
.
GLUE provides a default ILogger
that writes to the console.public static electric.util.log.ILogger getLogger(String name)
ILogger
object registered with the GLUE logging
subsystem with the specified name.name
- the name of the ILogger
objectILogger
objectpublic static electric.util.log.ILogger getDefaultLogger()
ILogger
object that GLUE provides.ILogger
objectpublic static boolean isLogging(String category)
category
- the logging categorypublic static void startLogging(String category)
category
- the logging categorypublic static void stopLogging(String category)
category
- the logging categorypublic static void log(String category, Object message)
category
- the logging categorymessage
- the log messagepublic static void logError(String module, String message)
module
- name of the module logging the messagemessage
- the log messagepublic static void logError(String message)
message
- the log messagepublic static void logException(String message, Throwable throwable)
message
- the log messagethrowable
- the Throwable
objectpublic static void logException(Throwable throwable)
throwable
- the Throwable
objectpublic static void logWarning(String module, String message)
module
- name of the module logging the messagemessage
- the log messagepublic static void logWarning(String message)
message
- the log messagepublic static void logNormal(String module, String message)
module
- name of the module logging the messagemessage
- the log messagepublic static void logNormal(String message)
message
- the log messagepublic static void logDebug(String module, String message)
module
- name of the module logging the messagemessage
- the log messagepublic static void logDebug(String message)
message
- the log messagepublic static void logMapping(String module, String message)
module
- name of the module logging the messagemessage
- the log messagepublic static void logMapping(String message)
message
- the log messagepublic void onLogEvent(String category, String module, String logMessage)
ILogListener
ILogListener.ERROR
, ILogListener.DEBUG
or ILogListener.INFO
onLogEvent
in interface ILogListener
category
- the serveritymodule
- the originating class / modulelogMessage
- the message detailspublic void onLogEvent(String category, String module, String logMessage, Throwable t)
ILogListener
ILogListener.ERROR
, ILogListener.DEBUG
or ILogListener.INFO
onLogEvent
in interface ILogListener
category
- the serveritymodule
- the originating class / modulelogMessage
- the message detailst
- the exception