net.spy.memcached.compat.log
Class Log4JLogger

java.lang.Object
  extended by net.spy.memcached.compat.log.AbstractLogger
      extended by net.spy.memcached.compat.log.Log4JLogger
All Implemented Interfaces:
Logger

public class Log4JLogger
extends AbstractLogger

Logging implementation using log4j.


Constructor Summary
Log4JLogger(String name)
          Get an instance of Log4JLogger.
 
Method Summary
 boolean isDebugEnabled()
          True if the underlying logger would allow debug messages through.
 boolean isInfoEnabled()
          True if the underlying logger would allow info messages through.
 void log(Level level, Object message, Throwable e)
          Wrapper around log4j.
 
Methods inherited from class net.spy.memcached.compat.log.AbstractLogger
debug, debug, debug, error, error, error, fatal, fatal, fatal, getName, getThrowable, info, info, info, log, warn, warn, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log4JLogger

public Log4JLogger(String name)
Get an instance of Log4JLogger.

Method Detail

isDebugEnabled

public boolean isDebugEnabled()
True if the underlying logger would allow debug messages through.

Specified by:
isDebugEnabled in interface Logger
Specified by:
isDebugEnabled in class AbstractLogger
Returns:
true if debug messages would be displayed

isInfoEnabled

public boolean isInfoEnabled()
True if the underlying logger would allow info messages through.

Specified by:
isInfoEnabled in interface Logger
Specified by:
isInfoEnabled in class AbstractLogger
Returns:
true if info messages would be displayed

log

public void log(Level level,
                Object message,
                Throwable e)
Wrapper around log4j.

Specified by:
log in interface Logger
Specified by:
log in class AbstractLogger
Parameters:
level - net.spy.compat.log.AbstractLogger level.
message - object message
e - optional throwable