com.flat502.rox.log
Class NullLog
java.lang.Object
com.flat502.rox.log.NullLog
- All Implemented Interfaces:
- Log
public class NullLog
- extends java.lang.Object
- implements Log
A Log
implementation that swallows
all logging and returns false for all logging level checks.
This simplifies writing code that would otherwise have to check
for a null log handle everywhere.
Method Summary |
void |
debug(java.lang.String msg)
|
void |
debug(java.lang.String msg,
java.lang.Throwable e)
|
void |
error(java.lang.String msg)
|
void |
error(java.lang.String msg,
java.lang.Throwable e)
|
void |
info(java.lang.String msg)
|
void |
info(java.lang.String msg,
java.lang.Throwable e)
|
boolean |
logDebug()
|
boolean |
logError()
|
boolean |
logInfo()
|
boolean |
logTrace()
|
boolean |
logWarn()
|
void |
trace(java.lang.String msg)
|
void |
trace(java.lang.String msg,
java.lang.Throwable e)
|
void |
warn(java.lang.String msg)
|
void |
warn(java.lang.String msg,
java.lang.Throwable e)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NullLog
public NullLog()
trace
public void trace(java.lang.String msg)
- Specified by:
trace
in interface Log
trace
public void trace(java.lang.String msg,
java.lang.Throwable e)
- Specified by:
trace
in interface Log
debug
public void debug(java.lang.String msg)
- Specified by:
debug
in interface Log
debug
public void debug(java.lang.String msg,
java.lang.Throwable e)
- Specified by:
debug
in interface Log
info
public void info(java.lang.String msg)
- Specified by:
info
in interface Log
info
public void info(java.lang.String msg,
java.lang.Throwable e)
- Specified by:
info
in interface Log
warn
public void warn(java.lang.String msg)
- Specified by:
warn
in interface Log
warn
public void warn(java.lang.String msg,
java.lang.Throwable e)
- Specified by:
warn
in interface Log
error
public void error(java.lang.String msg)
- Specified by:
error
in interface Log
error
public void error(java.lang.String msg,
java.lang.Throwable e)
- Specified by:
error
in interface Log
logTrace
public boolean logTrace()
- Specified by:
logTrace
in interface Log
logDebug
public boolean logDebug()
- Specified by:
logDebug
in interface Log
logInfo
public boolean logInfo()
- Specified by:
logInfo
in interface Log
logWarn
public boolean logWarn()
- Specified by:
logWarn
in interface Log
logError
public boolean logError()
- Specified by:
logError
in interface Log