Class NOPULogger
- All Implemented Interfaces:
ULogger
ULogger
.-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
There is no point in people creating multiple instances of NullLogger. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Log a message object with the DEBUG level.void
Log a parameterized message object at the DEBUG level.void
Log a message object with theDEBUG
level including the stack trace of theThrowable
t
passed as parameter.void
Log a parameterized message object at the DEBUG level.void
Log a message object with the ERROR level.void
Log a parameterized message object at the ERROR level.void
Log a message object with theERROR
level including the stack trace of theThrowable
t
passed as parameter.void
Log a parameterized message object at the ERROR level.static NOPULogger
Get instance.void
Log a message object with the INFO level.void
Log a parameterized message object at the INFO level.void
Log a message object with theINFO
level including the stack trace of theThrowable
t
passed as parameter.void
Log a parameterized message object at the INFO level.boolean
Is the logger instance enabled for the DEBUG level?boolean
Is the logger instance enabled for the ERROR level?boolean
Is the logger instance enabled for the INFO level?boolean
Is the logger instance enabled for the WARN level?void
Log a message object with the WARN level.void
Log a parameterized message object at the WARN level.void
Log a message object with theWARN
level including the stack trace of theThrowable
t
passed as parameter.void
Log a parameterized message object at the WARN level.
-
Field Details
-
NOP_LOGGER
The unique instance of NOPLogger.
-
-
Constructor Details
-
NOPULogger
private NOPULogger()There is no point in people creating multiple instances of NullLogger. Hence, the private access modifier.
-
-
Method Details
-
getLogger
Get instance.- Parameters:
name
- logger name.- Returns:
- logger.
-
isDebugEnabled
public boolean isDebugEnabled()Is the logger instance enabled for the DEBUG level?- Specified by:
isDebugEnabled
in interfaceULogger
- Returns:
- true if debug is enabled.
-
debug
Log a message object with the DEBUG level. -
debug
Log a parameterized message object at the DEBUG level.This form is useful in avoiding the superflous object creation problem when invoking this method while it is disabled.
-
debug
Log a parameterized message object at the DEBUG level.This form is useful in avoiding the superflous object creation problem when invoking this method while it is disabled.
-
debug
Log a message object with theDEBUG
level including the stack trace of theThrowable
t
passed as parameter. -
isInfoEnabled
public boolean isInfoEnabled()Is the logger instance enabled for the INFO level?- Specified by:
isInfoEnabled
in interfaceULogger
- Returns:
- true if debug is enabled.
-
info
Log a message object with the INFO level. -
info
Log a parameterized message object at the INFO level.This form is useful in avoiding the superflous object creation problem when invoking this method while it is disabled.
-
info
Log a parameterized message object at the INFO level.This form is useful in avoiding the superflous object creation problem when invoking this method while it is disabled.
-
info
Log a message object with theINFO
level including the stack trace of theThrowable
t
passed as parameter. -
isWarnEnabled
public boolean isWarnEnabled()Is the logger instance enabled for the WARN level?- Specified by:
isWarnEnabled
in interfaceULogger
- Returns:
- true if debug is enabled.
-
warn
Log a message object with the WARN level. -
warn
Log a parameterized message object at the WARN level.This form is useful in avoiding the superflous object creation problem when invoking this method while it is disabled.
-
warn
Log a parameterized message object at the WARN level.This form is useful in avoiding the superflous object creation problem when invoking this method while it is disabled.
-
warn
Log a message object with theWARN
level including the stack trace of theThrowable
t
passed as parameter. -
isErrorEnabled
public boolean isErrorEnabled()Is the logger instance enabled for the ERROR level?- Specified by:
isErrorEnabled
in interfaceULogger
- Returns:
- true if debug is enabled.
-
error
Log a message object with the ERROR level. -
error
Log a parameterized message object at the ERROR level.This form is useful in avoiding the superflous object creation problem when invoking this method while it is disabled.
-
error
Log a parameterized message object at the ERROR level.This form is useful in avoiding the superflous object creation problem when invoking this method while it is disabled.
-
error
Log a message object with theERROR
level including the stack trace of theThrowable
t
passed as parameter.
-