public final class Logger
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Logger.Event
Log event types
|
static class |
Logger.Level
Log levels
|
Modifier and Type | Method and Description |
---|---|
static boolean |
addExceptionListener(Listener<java.lang.Throwable> listener,
Logger.Event eventType)
Add an exception listener
|
static boolean |
addMessageListener(Listener<java.lang.String> listener,
Logger.Event eventType)
Add a message listener
|
static void |
init()
Logger initialization
|
static boolean |
isDebugEnabled() |
static boolean |
isErrorEnabled() |
static boolean |
isInfoEnabled() |
static boolean |
isWarningEnabled() |
static void |
logDebugMessage(java.lang.String message)
Log a debug message
|
static void |
logDebugMessage(java.lang.String format,
java.lang.Object... args)
Log a debug message
|
static void |
logDebugMessage(java.lang.String message,
java.lang.Throwable exc)
Log a debug exception
|
static void |
logErrorMessage(java.lang.String message)
Log an ERROR message
|
static void |
logErrorMessage(java.lang.String message,
java.lang.Throwable exc)
Log an ERROR exception
|
static void |
logInfoMessage(java.lang.String message)
Log an INFO message
|
static void |
logInfoMessage(java.lang.String format,
java.lang.Object... args)
Log an INFO message
|
static void |
logInfoMessage(java.lang.String message,
java.lang.Throwable exc)
Log an INFO exception
|
static void |
logMessage(java.lang.String message)
Log a message (map to INFO)
|
static void |
logMessage(java.lang.String message,
java.lang.Exception exc)
Log an exception (map to ERROR)
|
static void |
logShutdownMessage(java.lang.String message) |
static void |
logShutdownMessage(java.lang.String message,
java.lang.Exception e) |
static void |
logWarningMessage(java.lang.String message)
Log a WARNING message
|
static void |
logWarningMessage(java.lang.String message,
java.lang.Throwable exc)
Log a WARNING exception
|
static boolean |
removeExceptionListener(Listener<java.lang.Throwable> listener,
Logger.Event eventType)
Remove an exception listener
|
static boolean |
removeMessageListener(Listener<java.lang.String> listener,
Logger.Event eventType)
Remove a message listener
|
static void |
setLevel(Logger.Level level)
Set the log level
|
static void |
shutdown()
Logger shutdown
|
public static void init()
public static void shutdown()
public static void setLevel(Logger.Level level)
level
- Desired log levelpublic static boolean addMessageListener(Listener<java.lang.String> listener, Logger.Event eventType)
listener
- ListenereventType
- Notification event typepublic static boolean addExceptionListener(Listener<java.lang.Throwable> listener, Logger.Event eventType)
listener
- ListenereventType
- Notification event typepublic static boolean removeMessageListener(Listener<java.lang.String> listener, Logger.Event eventType)
listener
- ListenereventType
- Notification event typepublic static boolean removeExceptionListener(Listener<java.lang.Throwable> listener, Logger.Event eventType)
listener
- ListenereventType
- Notification event typepublic static void logMessage(java.lang.String message)
message
- Messagepublic static void logMessage(java.lang.String message, java.lang.Exception exc)
message
- Messageexc
- Exceptionpublic static void logShutdownMessage(java.lang.String message)
public static void logShutdownMessage(java.lang.String message, java.lang.Exception e)
public static boolean isErrorEnabled()
public static void logErrorMessage(java.lang.String message)
message
- Messagepublic static void logErrorMessage(java.lang.String message, java.lang.Throwable exc)
message
- Messageexc
- Exceptionpublic static boolean isWarningEnabled()
public static void logWarningMessage(java.lang.String message)
message
- Messagepublic static void logWarningMessage(java.lang.String message, java.lang.Throwable exc)
message
- Messageexc
- Exceptionpublic static boolean isInfoEnabled()
public static void logInfoMessage(java.lang.String message)
message
- Messagepublic static void logInfoMessage(java.lang.String format, java.lang.Object... args)
format
- Message formatargs
- Message argspublic static void logInfoMessage(java.lang.String message, java.lang.Throwable exc)
message
- Messageexc
- Exceptionpublic static boolean isDebugEnabled()
public static void logDebugMessage(java.lang.String message)
message
- Messagepublic static void logDebugMessage(java.lang.String format, java.lang.Object... args)
format
- Message formatargs
- Message argspublic static void logDebugMessage(java.lang.String message, java.lang.Throwable exc)
message
- Messageexc
- Exception