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 msg)
A NOP implementation.
|
void |
debug(String format,
Object... argArray)
A NOP implementation.
|
void |
debug(String format,
Object arg)
A NOP implementation.
|
void |
debug(String format,
Object arg1,
Object arg2)
A NOP implementation.
|
void |
debug(String msg,
Throwable t)
A NOP implementation.
|
void |
error(String msg)
A NOP implementation.
|
void |
error(String format,
Object... argArray)
A NOP implementation.
|
void |
error(String format,
Object arg1)
A NOP implementation.
|
void |
error(String format,
Object arg1,
Object arg2)
A NOP implementation.
|
void |
error(String msg,
Throwable t)
A NOP implementation.
|
String |
getName()
Always returns the string value "NOP".
|
void |
info(String msg)
A NOP implementation.
|
void |
info(String format,
Object... argArray)
A NOP implementation.
|
void |
info(String format,
Object arg1)
A NOP implementation.
|
void |
info(String format,
Object arg1,
Object arg2)
A NOP implementation.
|
void |
info(String msg,
Throwable t)
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 msg)
A NOP implementation.
|
void |
trace(String format,
Object... argArray)
A NOP implementation.
|
void |
trace(String format,
Object arg)
A NOP implementation.
|
void |
trace(String format,
Object arg1,
Object arg2)
A NOP implementation.
|
void |
trace(String msg,
Throwable t)
A NOP implementation.
|
void |
warn(String msg)
A NOP implementation.
|
void |
warn(String format,
Object... argArray)
A NOP implementation.
|
void |
warn(String format,
Object arg1)
A NOP implementation.
|
void |
warn(String format,
Object arg1,
Object arg2)
A NOP implementation.
|
void |
warn(String msg,
Throwable t)
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, warn
public static final NOPLogger NOP_LOGGER
protected String name
protected NOPLogger()
public final void debug(String msg)
msg
- the message string to be loggedpublic final void debug(String format, Object... argArray)
format
- the format stringargArray
- a list of 3 or more argumentspublic final void debug(String format, Object arg)
format
- the format stringarg
- the argumentpublic final void debug(String format, Object arg1, Object arg2)
format
- the format stringarg1
- the first argumentarg2
- the second argumentpublic final void debug(String msg, Throwable t)
msg
- the message accompanying the exceptiont
- the exception (throwable) to logpublic final void error(String msg)
msg
- the message string to be loggedpublic final void error(String format, Object... argArray)
format
- the format stringargArray
- a list of 3 or more argumentspublic final void error(String format, Object arg1)
format
- the format stringarg1
- the argumentpublic final void error(String format, Object arg1, Object arg2)
format
- the format stringarg1
- the first argumentarg2
- the second argumentpublic final void error(String msg, Throwable t)
msg
- the message accompanying the exceptiont
- the exception (throwable) to logpublic String getName()
public final void info(String msg)
msg
- the message string to be loggedpublic final void info(String format, Object... argArray)
format
- the format stringargArray
- a list of 3 or more argumentspublic final void info(String format, Object arg1)
format
- the format stringarg1
- the argumentpublic final void info(String format, Object arg1, Object arg2)
format
- the format stringarg1
- the first argumentarg2
- the second argumentpublic final void info(String msg, Throwable t)
msg
- the message accompanying the exceptiont
- the exception (throwable) to logpublic final boolean isDebugEnabled()
public final boolean isErrorEnabled()
public final boolean isInfoEnabled()
public final boolean isTraceEnabled()
public final boolean isWarnEnabled()
public final void trace(String msg)
msg
- the message string to be loggedpublic final void trace(String format, Object... argArray)
format
- the format stringargArray
- a list of 3 or more argumentspublic final void trace(String format, Object arg)
format
- the format stringarg
- the argumentpublic final void trace(String format, Object arg1, Object arg2)
format
- the format stringarg1
- the first argumentarg2
- the second argumentpublic final void trace(String msg, Throwable t)
msg
- the message accompanying the exceptiont
- the exception (throwable) to logpublic final void warn(String msg)
msg
- the message string to be loggedpublic final void warn(String format, Object... argArray)
format
- the format stringargArray
- a list of 3 or more argumentspublic final void warn(String format, Object arg1)
format
- the format stringarg1
- the argumentpublic final void warn(String format, Object arg1, Object arg2)
format
- the format stringarg1
- the first argumentarg2
- the second argumentpublic final void warn(String msg, Throwable t)
msg
- the message accompanying the exceptiont
- the exception (throwable) to logprotected Object readResolve() throws java.io.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.
java.io.ObjectStreamException