Package org.slf4j.helpers
Class NOPLogger
java.lang.Object
org.slf4j.helpers.NOPLogger
- All Implemented Interfaces:
Serializable
,Logger
A direct NOP (no operation) implementation of
Logger
.- Author:
- Ceki Gülcü
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
static final NOPLogger
The unique instance of NOPLogger.Fields inherited from interface org.slf4j.Logger
ROOT_LOGGER_NAME
-
Constructor Summary
ModifierConstructorDescriptionprotected
There is no point in creating multiple instances of NOPLogger. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
This method is similar toLogger.debug(String, Object...)
method except that the marker data is also taken into consideration.final void
A NOP implementation.final void
This method is similar toLogger.debug(String, Throwable)
method except that the marker data is also taken into consideration.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.getName()
Always returns the string value "NOP".final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final boolean
Always returns false.final boolean
isDebugEnabled
(Marker marker) Always returns false.final boolean
A NOP implementation.final boolean
isErrorEnabled
(Marker marker) Always returns false.final boolean
Always returns false.boolean
isInfoEnabled
(Marker marker) Always returns false.final boolean
Always returns false.final boolean
isTraceEnabled
(Marker marker) Always returns false.final boolean
Always returns false.final boolean
isWarnEnabled
(Marker marker) Always returns false.protected Object
Replace this instance with a homonymous (same name) logger returned by LoggerFactory.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.final void
A NOP implementation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.slf4j.Logger
atDebug, atError, atInfo, atLevel, atTrace, atWarn, isEnabledForLevel, makeLoggingEventBuilder
-
Field Details
-
NOP_LOGGER
The unique instance of NOPLogger. -
name
-
-
Constructor Details
-
NOPLogger
protected NOPLogger()There is no point in creating multiple instances of NOPLogger. The present constructor should be "private" but we are leaving it as "protected" for compatibility.
-
-
Method Details
-
getName
Always returns the string value "NOP". -
isTraceEnabled
Always returns false.- Specified by:
isTraceEnabled
in interfaceLogger
- Returns:
- always false
-
trace
A NOP implementation. -
trace
A NOP implementation. -
trace
A NOP implementation. -
trace
A NOP implementation. -
trace
A NOP implementation. -
isDebugEnabled
Always returns false.- Specified by:
isDebugEnabled
in interfaceLogger
- Returns:
- always false
-
debug
A NOP implementation. -
debug
A NOP implementation. -
debug
A NOP implementation. -
debug
A NOP implementation. -
debug
A NOP implementation. -
isInfoEnabled
Always returns false.- Specified by:
isInfoEnabled
in interfaceLogger
- Returns:
- always false
-
info
A NOP implementation. -
info
A NOP implementation. -
info
A NOP implementation. -
info
A NOP implementation. -
info
A NOP implementation. -
isWarnEnabled
Always returns false.- Specified by:
isWarnEnabled
in interfaceLogger
- Returns:
- always false
-
warn
A NOP implementation. -
warn
A NOP implementation. -
warn
A NOP implementation. -
warn
A NOP implementation. -
warn
A NOP implementation. -
isErrorEnabled
A NOP implementation.- Specified by:
isErrorEnabled
in interfaceLogger
- Returns:
- True if this Logger is enabled for the ERROR level, false otherwise.
-
error
A NOP implementation. -
error
A NOP implementation. -
error
A NOP implementation. -
error
A NOP implementation. -
error
A NOP implementation. -
isTraceEnabled
Always returns false.- Specified by:
isTraceEnabled
in interfaceLogger
- Parameters:
marker
- The marker data to take into consideration- Returns:
- always false
-
trace
A NOP implementation. -
trace
A NOP implementation. -
trace
A NOP implementation. -
trace
A NOP implementation. -
trace
A NOP implementation. -
isDebugEnabled
Always returns false.- Specified by:
isDebugEnabled
in interfaceLogger
- Parameters:
marker
- The marker data to take into consideration- Returns:
- always false
-
debug
A NOP implementation. -
debug
A NOP implementation. -
debug
A NOP implementation. -
debug
Description copied from interface:Logger
This method is similar toLogger.debug(String, Object...)
method except that the marker data is also taken into consideration. -
debug
Description copied from interface:Logger
This method is similar toLogger.debug(String, Throwable)
method except that the marker data is also taken into consideration. -
isInfoEnabled
Always returns false.- Specified by:
isInfoEnabled
in interfaceLogger
- Parameters:
marker
- The marker data to take into consideration- Returns:
- always false
-
info
A NOP implementation. -
info
A NOP implementation. -
info
A NOP implementation. -
info
A NOP implementation. -
info
A NOP implementation. -
isWarnEnabled
Always returns false.- Specified by:
isWarnEnabled
in interfaceLogger
- Parameters:
marker
- The marker data to take into consideration- Returns:
- always false
-
warn
A NOP implementation. -
warn
A NOP implementation. -
warn
A NOP implementation. -
warn
A NOP implementation. -
warn
A NOP implementation. -
isErrorEnabled
Always returns false.- Specified by:
isErrorEnabled
in interfaceLogger
- Parameters:
marker
- The marker data to take into consideration- Returns:
- always false
-
error
A NOP implementation. -
error
A NOP implementation. -
error
A NOP implementation. -
error
A NOP implementation. -
error
A NOP implementation. -
readResolve
Replace this instance with a homonymous (same name) logger returned by LoggerFactory. Note that this method is only called during deserialization.This approach will work well if the desired ILoggerFactory is the one referenced by LoggerFactory. However, if the user manages its logger hierarchy through a different (non-static) mechanism, e.g. dependency injection, then this approach would be mostly counterproductive.
- Returns:
- logger with same name as returned by LoggerFactory
- Throws:
ObjectStreamException
-