public interface Logger
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ANONYMOUS_LOGGER_NAME |
static java.lang.String |
LL_DEBUG
This is the log level string representation for DEBUG
|
static java.lang.String |
LL_ERROR
This is the log level string representation for ERROR
|
static java.lang.String |
LL_INFO
This is the log level string representation for INFO
|
static java.lang.String |
LL_NONE
This is the log level string representation for NONE
|
static java.lang.String |
LL_WARNING
This is the log level string representation for WARNING
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
Returns the name of this logger.
|
void |
initialize(java.util.Properties properties)
Initialize the logger from the given properties settings.
|
boolean |
isLoggingDebugs()
Returns true, if debug messages will be written to the output device(s).
|
boolean |
isLoggingErrors()
Returns true, if errors will be written to the output device(s).
|
boolean |
isLoggingInfos()
Returns true, if info messages will be written to the output device(s).
|
boolean |
isLoggingWarnings()
Returns true, if warnings will be written to the output device(s).
|
void |
logDebug(java.lang.String message,
java.lang.Object... params)
If the logging level is DEBUG the given message will be written to
the log output device(s).
|
void |
logError(java.lang.String message,
java.lang.Object... params)
If the logging level is DEBUG, INFO, WARNING or ERROR the given message
will be written to the log output device(s).
|
void |
logError(java.lang.String message,
java.lang.Throwable exception)
If the logging level is DEBUG, INFO, WARNING or ERROR the given message
and the exception will be written to the log output device(s).
|
void |
logException(java.lang.Throwable ex)
Writes the given exception to the log output device(s).
|
void |
logInfo(java.lang.String message,
java.lang.Object... params)
If the logging level is INFO or DEBUG the given message will be
written to the log output device(s).
|
void |
logWarning(java.lang.String message,
java.lang.Object... params)
If the logging level is DEBUG, INFO or WARNING the given message will
be written to the log output device(s).
|
void |
logWarning(java.lang.String message,
java.lang.Throwable exception)
If the logging level is DEBUG, INFO or WARNING the given message
and the exception will be written to the log output device(s).
|
boolean |
setLogLevel(java.lang.String logLevel)
Changes the log level to the specified level.
|
static final java.lang.String ANONYMOUS_LOGGER_NAME
static final java.lang.String LL_NONE
static final java.lang.String LL_ERROR
static final java.lang.String LL_WARNING
static final java.lang.String LL_INFO
static final java.lang.String LL_DEBUG
java.lang.String getName()
void initialize(java.util.Properties properties)
void logException(java.lang.Throwable ex)
void logDebug(java.lang.String message, java.lang.Object... params)
message
- The message to log. It may contain placeholders like {0}, {1} etc.params
- Optional parameters to be used for replacing placeholders in the message text.void logInfo(java.lang.String message, java.lang.Object... params)
message
- The message to log. It may contain placeholders like {0}, {1} etc.params
- Optional parameters to be used for replacing placeholders in the message text.void logWarning(java.lang.String message, java.lang.Object... params)
message
- The message to log. It may contain placeholders like {0}, {1} etc.params
- Optional parameters to be used for replacing placeholders in the message text.void logError(java.lang.String message, java.lang.Object... params)
message
- The message to log. It may contain placeholders like {0}, {1} etc.params
- Optional parameters to be used for replacing placeholders in the message text.void logWarning(java.lang.String message, java.lang.Throwable exception)
void logError(java.lang.String message, java.lang.Throwable exception)
boolean isLoggingDebugs()
boolean isLoggingInfos()
boolean isLoggingWarnings()
boolean isLoggingErrors()
boolean setLogLevel(java.lang.String logLevel)
logLevel
- One of the LL_ constants defined in this interface (e.g. LL_ERROR
).