Package net.spy.memcached.compat.log
Class AbstractLogger
java.lang.Object
net.spy.memcached.compat.log.AbstractLogger
- All Implemented Interfaces:
Logger
- Direct Known Subclasses:
DefaultLogger,Log4JLogger,SLF4JLogger,SunLogger
Abstract implementation of Logger providing most of the common framework.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractLogger(String nm) Instantiate the abstract logger. -
Method Summary
Modifier and TypeMethodDescriptionvoidLog a message at debug level.voidLog a message at debug level.voidLog a formatted message at debug level.voidLog a message at error level.voidLog a message at error level.voidLog a formatted message at debug level.voidLog a message at fatal level.voidLog a message at fatal level.voidLog a formatted message at debug level.getName()Get the name of this logger.getThrowable(Object[] args) Get the throwable from the last element of this array if it is Throwable, else null.voidLog a message at info level.voidLog a message at info level.voidLog a formatted message at info level.abstract booleanTrue if debug is enabled for this logger.abstract booleanTrue if debug is enabled for this logger.voidLog a message at the given level.abstract voidSubclasses should implement this method to determine what to do when a client wants to log at a particular level.voidLog a message at trace level.voidLog a message at trace level.voidLog a formatted message at trace level.voidLog a message at warning level.voidLog a message at warning level.voidLog a formatted message at debug level.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.spy.memcached.compat.log.Logger
isTraceEnabled
-
Constructor Details
-
AbstractLogger
Instantiate the abstract logger.
-
-
Method Details
-
getName
Get the name of this logger. -
getThrowable
Get the throwable from the last element of this array if it is Throwable, else null. -
isDebugEnabled
public abstract boolean isDebugEnabled()True if debug is enabled for this logger. Default implementation always returns false- Specified by:
isDebugEnabledin interfaceLogger- Returns:
- true if debug messages would be displayed
-
isInfoEnabled
public abstract boolean isInfoEnabled()True if debug is enabled for this logger. Default implementation always returns false- Specified by:
isInfoEnabledin interfaceLogger- Returns:
- true if info messages would be displayed
-
trace
Log a message at trace level. -
trace
Log a formatted message at trace level. -
trace
Log a message at trace level. -
debug
Log a message at debug level. -
debug
Log a formatted message at debug level. -
debug
Log a message at debug level. -
info
Log a message at info level. -
info
Log a formatted message at info level. -
info
Log a message at info level. -
warn
Log a message at warning level. -
warn
Log a formatted message at debug level. -
warn
Log a message at warning level. -
error
Log a message at error level. -
error
Log a formatted message at debug level. -
error
Log a message at error level. -
fatal
Log a message at fatal level. -
fatal
Log a formatted message at debug level. -
fatal
Log a message at fatal level. -
log
Log a message at the given level. -
log
Subclasses should implement this method to determine what to do when a client wants to log at a particular level.
-