public class NilLogger extends java.lang.Object implements Logger
ANONYMOUS_LOGGER_NAME, LL_DEBUG, LL_ERROR, LL_INFO, LL_NONE, LL_WARNING
Constructor and Description |
---|
NilLogger()
Initialize the new instance with default values.
|
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.
|
public java.lang.String getName()
Logger
public void initialize(java.util.Properties properties)
initialize
in interface Logger
public void logException(java.lang.Throwable ex)
logException
in interface Logger
public void logDebug(java.lang.String message, java.lang.Object... params)
public void logInfo(java.lang.String message, java.lang.Object... params)
public void logWarning(java.lang.String message, java.lang.Object... params)
logWarning
in interface Logger
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.public void logError(java.lang.String message, java.lang.Object... params)
public void logWarning(java.lang.String message, java.lang.Throwable exception)
logWarning
in interface Logger
public void logError(java.lang.String message, java.lang.Throwable exception)
public boolean isLoggingDebugs()
isLoggingDebugs
in interface Logger
public boolean isLoggingInfos()
isLoggingInfos
in interface Logger
public boolean isLoggingWarnings()
isLoggingWarnings
in interface Logger
public boolean isLoggingErrors()
isLoggingErrors
in interface Logger
public boolean setLogLevel(java.lang.String logLevel)
setLogLevel
in interface Logger
logLevel
- One of the LL_ constants defined in this interface (e.g. Logger.LL_ERROR
).