net.spy.memcached.compat.log
Interface Logger

All Known Implementing Classes:
AbstractLogger, DefaultLogger, Log4JLogger, SunLogger

public interface Logger

Abstract mechanism for dealing with logs from various objects. Implementations are expected to have a constructor that takes a single String representing the name of the logging item, or an empty constructor.

See Also:
LoggerFactory

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.
 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.
 boolean isDebugEnabled()
          True if debug is enabled for this logger.
 boolean isInfoEnabled()
          True if info is enabled for this logger.
 void log(Level level, Object message)
          Log a message at the specified level.
 void log(Level level, Object message, Throwable exception)
          Log a message at the specified 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.
 

Method Detail

getName

String getName()
Get the name of this logger.


isDebugEnabled

boolean isDebugEnabled()
True if debug is enabled for this logger.

Returns:
true if debug messages would be displayed

isInfoEnabled

boolean isInfoEnabled()
True if info is enabled for this logger.

Returns:
true if info messages would be displayed

log

void log(Level level,
         Object message,
         Throwable exception)
Log a message at the specified level.

Parameters:
level - the level at which to log
message - the message to log
exception - an exception that caused the message

log

void log(Level level,
         Object message)
Log a message at the specified level.

Parameters:
level - the level at which to log
message - the message to log

debug

void debug(Object message,
           Throwable exception)
Log a message at debug level.

Parameters:
message - the message to log
exception - the exception that caused the message to be generated

debug

void debug(Object message)
Log a message at debug level.

Parameters:
message - the message to log

debug

void debug(String message,
           Object... args)
Log a formatted message at debug level.

Parameters:
message - the message to log
args - the arguments for that message

info

void info(Object message,
          Throwable exception)
Log a message at info level.

Parameters:
message - the message to log
exception - the exception that caused the message to be generated

info

void info(Object message)
Log a message at info level.

Parameters:
message - the message to log

info

void info(String message,
          Object... args)
Log a formatted message at info level.

Parameters:
message - the message to log
args - the arguments for that message

warn

void warn(Object message,
          Throwable exception)
Log a message at warning level.

Parameters:
message - the message to log
exception - the exception that caused the message to be generated

warn

void warn(Object message)
Log a message at warning level.

Parameters:
message - the message to log

warn

void warn(String message,
          Object... args)
Log a formatted message at debug level.

Parameters:
message - the message to log
args - the arguments for that message

error

void error(Object message,
           Throwable exception)
Log a message at error level.

Parameters:
message - the message to log
exception - the exception that caused the message to be generated

error

void error(Object message)
Log a message at error level.

Parameters:
message - the message to log

error

void error(String message,
           Object... args)
Log a formatted message at debug level.

Parameters:
message - the message to log
args - the arguments for that message

fatal

void fatal(Object message,
           Throwable exception)
Log a message at fatal level.

Parameters:
message - the message to log
exception - the exception that caused the message to be generated

fatal

void fatal(Object message)
Log a message at fatal level.

Parameters:
message - the message to log

fatal

void fatal(String message,
           Object... args)
Log a formatted message at debug level.

Parameters:
message - the message to log
args - the arguments for that message