public class SunLogger extends AbstractLogger
The SunLogger implements logging using the java.util.logging facilities. Since the logging levels provided by this implementations do not map directly to those provided by SLF4J or Log4J, different mappings are applied.
Aside from the logging levels that are named the same, all log messages that get logged at the TRACE level get translated to the FINEST level. Also, both ERROR and FATAL levels get translated to SEVERE.
Constructor and Description |
---|
SunLogger(java.lang.String name)
Get an instance of SunLogger.
|
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 sun logger.
|
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.AbstractLogger level.message
- object messagee
- optional throwableCopyright © 2006-2009 Dustin Sallings, 2009-2013 Couchbase, Inc.