Package net.spy.memcached.compat.log
Class DefaultLogger
- java.lang.Object
-
- net.spy.memcached.compat.log.AbstractLogger
-
- net.spy.memcached.compat.log.DefaultLogger
-
- All Implemented Interfaces:
Logger
public class DefaultLogger extends AbstractLogger
Default logger implementation. This logger is really primitive. It just logs everything to stderr if it's higher than INFO.
-
-
Field Summary
Fields Modifier and Type Field Description private java.text.SimpleDateFormat
df
-
Constructor Summary
Constructors Constructor Description DefaultLogger(java.lang.String name)
Get an instance of DefaultLogger.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isDebugEnabled()
Always returns false, debug is not enabled on the DefaultLogger.boolean
isInfoEnabled()
Always returns true, info is always enabled on the DefaultLogger.boolean
isTraceEnabled()
Always returns false, trace is not enabled on the DefaultLogger.void
log(Level level, java.lang.Object message, java.lang.Throwable e)
Subclasses should implement this method to determine what to do when a client wants to log at a particular level.
-
-
-
Method Detail
-
isTraceEnabled
public boolean isTraceEnabled()
Always returns false, trace is not enabled on the DefaultLogger.- Returns:
- true if trace messages would be displayed.
-
isDebugEnabled
public boolean isDebugEnabled()
Always returns false, debug is not enabled on the DefaultLogger.- Specified by:
isDebugEnabled
in interfaceLogger
- Specified by:
isDebugEnabled
in classAbstractLogger
- Returns:
- true if debug messages would be displayed
-
isInfoEnabled
public boolean isInfoEnabled()
Always returns true, info is always enabled on the DefaultLogger.- Specified by:
isInfoEnabled
in interfaceLogger
- Specified by:
isInfoEnabled
in classAbstractLogger
- Returns:
- true if info messages would be displayed
-
log
public void log(Level level, java.lang.Object message, java.lang.Throwable e)
Description copied from class:AbstractLogger
Subclasses should implement this method to determine what to do when a client wants to log at a particular level.- Specified by:
log
in interfaceLogger
- Specified by:
log
in classAbstractLogger
- Parameters:
level
- the level to log at (see the fields of this class)message
- the message to loge
- the exception that caused the message (or null)- See Also:
AbstractLogger
-
-