public class SLF4JLogger extends AbstractLogger
Note that by design, the SLF4J facade does not ship with an actual implementation so that it can be chosen during runtime. If you fail to provide a logging implementation during runtime, no log messages will be logged. See the SLF4J Manual for more information on how to do this.
Since SLF4J does not support a FATAL log level, errors logged at that level get promoted down to ERROR, since this is the highest level available.
Constructor and Description |
---|
SLF4JLogger(java.lang.String name)
Get an instance of the SLF4JLogger.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isDebugEnabled()
True if debug is enabled for this logger.
|
boolean |
isInfoEnabled()
True if debug is enabled for this logger.
|
boolean |
isTraceEnabled()
Checks whether TRACE logging is enabled.
|
void |
log(Level level,
java.lang.Object message,
java.lang.Throwable e)
Wrapper around SLF4J logger facade.
|
public SLF4JLogger(java.lang.String name)
public boolean isTraceEnabled()
Logger
if (log.isTraceEnabled()) {
... expensive code here ...
log.trace(result);
}
public boolean isDebugEnabled()
AbstractLogger
isDebugEnabled
in interface Logger
isDebugEnabled
in class AbstractLogger
public boolean isInfoEnabled()
AbstractLogger
isInfoEnabled
in interface Logger
isInfoEnabled
in class AbstractLogger
public void log(Level level, java.lang.Object message, java.lang.Throwable e)
log
in interface Logger
log
in class AbstractLogger
level
- net.spy.compat.log.Level level.message
- object messagee
- optional throwableCopyright © 2006-2009 Dustin Sallings, 2009-2013 Couchbase, Inc.