|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.spy.memcached.compat.log.AbstractLogger
public abstract class AbstractLogger
Abstract implementation of Logger providing most of the common framework.
Constructor Summary | |
---|---|
protected |
AbstractLogger(String nm)
Instantiate the abstract logger. |
Method Summary | |
---|---|
void |
debug(Object message)
Log a message at debug level. |
void |
debug(Object message,
Throwable exception)
Log a message at debug level. |
void |
debug(String message,
Object... args)
Log a formatted message at debug level. |
void |
error(Object message)
Log a message at error level. |
void |
error(Object message,
Throwable exception)
Log a message at error level. |
void |
error(String message,
Object... args)
Log a formatted message at debug level. |
void |
fatal(Object message)
Log a message at fatal level. |
void |
fatal(Object message,
Throwable exception)
Log a message at fatal level. |
void |
fatal(String message,
Object... args)
Log a formatted message at debug level. |
String |
getName()
Get the name of this logger. |
Throwable |
getThrowable(Object[] args)
Get the throwable from the last element of this array if it is Throwable, else null. |
void |
info(Object message)
Log a message at info level. |
void |
info(Object message,
Throwable exception)
Log a message at info level. |
void |
info(String message,
Object... args)
Log a formatted message at info level. |
abstract boolean |
isDebugEnabled()
True if debug is enabled for this logger. |
abstract boolean |
isInfoEnabled()
True if debug is enabled for this logger. |
void |
log(Level level,
Object message)
Log a message at the given level. |
abstract void |
log(Level level,
Object message,
Throwable e)
Subclasses should implement this method to determine what to do when a client wants to log at a particular level. |
void |
warn(Object message)
Log a message at warning level. |
void |
warn(Object message,
Throwable exception)
Log a message at warning level. |
void |
warn(String message,
Object... args)
Log a formatted message at debug level. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractLogger(String nm)
Method Detail |
---|
public String getName()
getName
in interface Logger
public Throwable getThrowable(Object[] args)
public abstract boolean isDebugEnabled()
isDebugEnabled
in interface Logger
public abstract boolean isInfoEnabled()
isInfoEnabled
in interface Logger
public void debug(Object message, Throwable exception)
debug
in interface Logger
message
- the message to logexception
- the exception that caused the message to be generatedpublic void debug(String message, Object... args)
debug
in interface Logger
message
- the message to logargs
- the arguments for that messagepublic void debug(Object message)
debug
in interface Logger
message
- the message to logpublic void info(Object message, Throwable exception)
info
in interface Logger
message
- the message to logexception
- the exception that caused the message to be generatedpublic void info(String message, Object... args)
info
in interface Logger
message
- the message to logargs
- the arguments for that messagepublic void info(Object message)
info
in interface Logger
message
- the message to logpublic void warn(Object message, Throwable exception)
warn
in interface Logger
message
- the message to logexception
- the exception that caused the message to be generatedpublic void warn(String message, Object... args)
warn
in interface Logger
message
- the message to logargs
- the arguments for that messagepublic void warn(Object message)
warn
in interface Logger
message
- the message to logpublic void error(Object message, Throwable exception)
error
in interface Logger
message
- the message to logexception
- the exception that caused the message to be generatedpublic void error(String message, Object... args)
error
in interface Logger
message
- the message to logargs
- the arguments for that messagepublic void error(Object message)
error
in interface Logger
message
- the message to logpublic void fatal(Object message, Throwable exception)
fatal
in interface Logger
message
- the message to logexception
- the exception that caused the message to be generatedpublic void fatal(String message, Object... args)
fatal
in interface Logger
message
- the message to logargs
- the arguments for that messagepublic void fatal(Object message)
fatal
in interface Logger
message
- the message to logpublic void log(Level level, Object message)
log
in interface Logger
level
- the levelmessage
- the messagepublic abstract void log(Level level, Object message, Throwable e)
log
in interface Logger
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |