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()
Loggerpublic void initialize(java.util.Properties properties)
initialize in interface Loggerpublic void logException(java.lang.Throwable ex)
logException in interface Loggerpublic 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 Loggermessage - 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 Loggerpublic void logError(java.lang.String message,
java.lang.Throwable exception)
public boolean isLoggingDebugs()
isLoggingDebugs in interface Loggerpublic boolean isLoggingInfos()
isLoggingInfos in interface Loggerpublic boolean isLoggingWarnings()
isLoggingWarnings in interface Loggerpublic boolean isLoggingErrors()
isLoggingErrors in interface Loggerpublic boolean setLogLevel(java.lang.String logLevel)
setLogLevel in interface LoggerlogLevel - One of the LL_ constants defined in this interface (e.g. Logger.LL_ERROR).