public class NOPLogger extends MarkerIgnoringBase
Logger.
| Modifier and Type | Field and Description |
|---|---|
protected String |
name
|
static NOPLogger |
NOP_LOGGER
The unique instance of NOPLogger.
|
ROOT_LOGGER_NAME| Modifier | Constructor and Description |
|---|---|
protected |
NOPLogger()
There is no point in creating multiple instances of NOPLOgger, except by derived classes, hence the protected access for the constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
debug(String
A NOP implementation.
|
void |
debug(String
A NOP implementation.
|
void |
debug(String
A NOP implementation.
|
void |
debug(String
A NOP implementation.
|
void |
debug(String
A NOP implementation.
|
void |
error(String
A NOP implementation.
|
void |
error(String
A NOP implementation.
|
void |
error(String
A NOP implementation.
|
void |
error(String
A NOP implementation.
|
void |
error(String
A NOP implementation.
|
String |
getName()
Always returns the string value "NOP".
|
void |
info(String
A NOP implementation.
|
void |
info(String
A NOP implementation.
|
void |
info(String
A NOP implementation.
|
void |
info(String
A NOP implementation.
|
void |
info(String
A NOP implementation.
|
boolean |
isDebugEnabled()
Always returns false.
|
boolean |
isErrorEnabled()
A NOP implementation.
|
boolean |
isInfoEnabled()
Always returns false.
|
boolean |
isTraceEnabled()
Always returns false.
|
boolean |
isWarnEnabled()
Always returns false.
|
protected Object |
readResolve()
Replace this instance with a homonymous (same name) logger returned by LoggerFactory.
|
void |
trace(String
A NOP implementation.
|
void |
trace(String
A NOP implementation.
|
void |
trace(String
A NOP implementation.
|
void |
trace(String
A NOP implementation.
|
void |
trace(String
A NOP implementation.
|
void |
warn(String
A NOP implementation.
|
void |
warn(String
A NOP implementation.
|
void |
warn(String
A NOP implementation.
|
void |
warn(String
A NOP implementation.
|
void |
warn(String
A NOP implementation.
|
debug, debug, debug, debug, debug, error, error, error, error, error, info, info, info, info, info, isDebugEnabled, isErrorEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled, toString, trace, trace, trace, trace, trace, warn, warn, warn, warn, warnpublic static final NOPLoggerNOP_LOGGER
protected Stringname
protected NOPLogger()
public StringgetName()
public final boolean isTraceEnabled()
public final void trace(Stringmsg)
msg - the message string to be logged
public final void trace(Stringformat, Object arg)
format - the format string
arg - the argument
public final void trace(Stringformat, Object arg1, Object arg2)
format - the format string
arg1 - the first argument
arg2 - the second argument
public final void trace(Stringformat, Object ... argArray)
format - the format string
argArray - a list of 3 or more arguments
public final void trace(Stringmsg, Throwable t)
msg - the message accompanying the exception
t - the exception (throwable) to log
public final boolean isDebugEnabled()
public final void debug(Stringmsg)
msg - the message string to be logged
public final void debug(Stringformat, Object arg)
format - the format string
arg - the argument
public final void debug(Stringformat, Object arg1, Object arg2)
format - the format string
arg1 - the first argument
arg2 - the second argument
public final void debug(Stringformat, Object ... argArray)
format - the format string
argArray - a list of 3 or more arguments
public final void debug(Stringmsg, Throwable t)
msg - the message accompanying the exception
t - the exception (throwable) to log
public final boolean isInfoEnabled()
public final void info(Stringmsg)
msg - the message string to be logged
public final void info(Stringformat, Object arg1)
format - the format string
arg1 - the argument
public final void info(Stringformat, Object arg1, Object arg2)
format - the format string
arg1 - the first argument
arg2 - the second argument
public final void info(Stringformat, Object ... argArray)
format - the format string
argArray - a list of 3 or more arguments
public final void info(Stringmsg, Throwable t)
msg - the message accompanying the exception
t - the exception (throwable) to log
public final boolean isWarnEnabled()
public final void warn(Stringmsg)
msg - the message string to be logged
public final void warn(Stringformat, Object arg1)
format - the format string
arg1 - the argument
public final void warn(Stringformat, Object arg1, Object arg2)
format - the format string
arg1 - the first argument
arg2 - the second argument
public final void warn(Stringformat, Object ... argArray)
format - the format string
argArray - a list of 3 or more arguments
public final void warn(Stringmsg, Throwable t)
msg - the message accompanying the exception
t - the exception (throwable) to log
public final boolean isErrorEnabled()
public final void error(Stringmsg)
msg - the message string to be logged
public final void error(Stringformat, Object arg1)
format - the format string
arg1 - the argument
public final void error(Stringformat, Object arg1, Object arg2)
format - the format string
arg1 - the first argument
arg2 - the second argument
public final void error(Stringformat, Object ... argArray)
format - the format string
argArray - a list of 3 or more arguments
public final void error(Stringmsg, Throwable t)
msg - the message accompanying the exception
t - the exception (throwable) to log
protected ObjectreadResolve() throws ObjectStreamException
This approach will work well if the desired ILoggerFactory is the one references 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.
ObjectStreamException -