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()
Loggerif (log.isTraceEnabled()) {
... expensive code here ...
log.trace(result);
}
public boolean isDebugEnabled()
AbstractLoggerisDebugEnabled in interface LoggerisDebugEnabled in class AbstractLoggerpublic boolean isInfoEnabled()
AbstractLoggerisInfoEnabled in interface LoggerisInfoEnabled in class AbstractLoggerpublic void log(Level level, java.lang.Object message, java.lang.Throwable e)
log in interface Loggerlog in class AbstractLoggerlevel - net.spy.compat.log.AbstractLogger level.message - object messagee - optional throwableCopyright © 2006-2009 Dustin Sallings, 2009-2013 Couchbase, Inc.