org.slf4j.ext
Class LoggerWrapper

java.lang.Object
  extended by org.slf4j.ext.LoggerWrapper
All Implemented Interfaces:
Logger
Direct Known Subclasses:
XLogger

public class LoggerWrapper
extends Object
implements Logger

A helper class wrapping an Logger instance preserving location information if the wrapped instance supports it.

Author:
Ralph Goers, Ceki Gülcü

Field Summary
 
Fields inherited from interface org.slf4j.Logger
ROOT_LOGGER_NAME
 
Constructor Summary
LoggerWrapper(Logger logger, String fqcn)
           
 
Method Summary
 void debug(Marker marker, String msg)
          Delegate to the appropriate method of the underlying logger.
 void debug(Marker marker, String format, Object arg)
          Delegate to the appropriate method of the underlying logger.
 void debug(Marker marker, String format, Object[] argArray)
          Delegate to the appropriate method of the underlying logger.
 void debug(Marker marker, String format, Object arg1, Object arg2)
          Delegate to the appropriate method of the underlying logger.
 void debug(Marker marker, String msg, Throwable t)
          Delegate to the appropriate method of the underlying logger.
 void debug(String msg)
          Delegate to the appropriate method of the underlying logger.
 void debug(String format, Object arg)
          Delegate to the appropriate method of the underlying logger.
 void debug(String format, Object[] argArray)
          Delegate to the appropriate method of the underlying logger.
 void debug(String format, Object arg1, Object arg2)
          Delegate to the appropriate method of the underlying logger.
 void debug(String msg, Throwable t)
          Delegate to the appropriate method of the underlying logger.
 void error(Marker marker, String msg)
          Delegate to the appropriate method of the underlying logger.
 void error(Marker marker, String format, Object arg)
          Delegate to the appropriate method of the underlying logger.
 void error(Marker marker, String format, Object[] argArray)
          Delegate to the appropriate method of the underlying logger.
 void error(Marker marker, String format, Object arg1, Object arg2)
          Delegate to the appropriate method of the underlying logger.
 void error(Marker marker, String msg, Throwable t)
          Delegate to the appropriate method of the underlying logger.
 void error(String msg)
          Delegate to the appropriate method of the underlying logger.
 void error(String format, Object arg)
          Delegate to the appropriate method of the underlying logger.
 void error(String format, Object[] argArray)
          Delegate to the appropriate method of the underlying logger.
 void error(String format, Object arg1, Object arg2)
          Delegate to the appropriate method of the underlying logger.
 void error(String msg, Throwable t)
          Delegate to the appropriate method of the underlying logger.
 String getName()
          Delegate to the appropriate method of the underlying logger.
 void info(Marker marker, String msg)
          Delegate to the appropriate method of the underlying logger.
 void info(Marker marker, String format, Object arg)
          Delegate to the appropriate method of the underlying logger.
 void info(Marker marker, String format, Object[] argArray)
          Delegate to the appropriate method of the underlying logger.
 void info(Marker marker, String format, Object arg1, Object arg2)
          Delegate to the appropriate method of the underlying logger.
 void info(Marker marker, String msg, Throwable t)
          Delegate to the appropriate method of the underlying logger.
 void info(String msg)
          Delegate to the appropriate method of the underlying logger.
 void info(String format, Object arg)
          Delegate to the appropriate method of the underlying logger.
 void info(String format, Object[] argArray)
          Delegate to the appropriate method of the underlying logger.
 void info(String format, Object arg1, Object arg2)
          Delegate to the appropriate method of the underlying logger.
 void info(String msg, Throwable t)
          Delegate to the appropriate method of the underlying logger.
 boolean isDebugEnabled()
          Delegate to the appropriate method of the underlying logger.
 boolean isDebugEnabled(Marker marker)
          Delegate to the appropriate method of the underlying logger.
 boolean isErrorEnabled()
          Delegate to the appropriate method of the underlying logger.
 boolean isErrorEnabled(Marker marker)
          Delegate to the appropriate method of the underlying logger.
 boolean isInfoEnabled()
          Delegate to the appropriate method of the underlying logger.
 boolean isInfoEnabled(Marker marker)
          Delegate to the appropriate method of the underlying logger.
 boolean isTraceEnabled()
          Delegate to the appropriate method of the underlying logger.
 boolean isTraceEnabled(Marker marker)
          Delegate to the appropriate method of the underlying logger.
 boolean isWarnEnabled()
          Is the logger instance enabled for the WARN level?
 boolean isWarnEnabled(Marker marker)
          Delegate to the appropriate method of the underlying logger.
 void trace(Marker marker, String msg)
          Delegate to the appropriate method of the underlying logger.
 void trace(Marker marker, String format, Object arg)
          Delegate to the appropriate method of the underlying logger.
 void trace(Marker marker, String format, Object[] argArray)
          Delegate to the appropriate method of the underlying logger.
 void trace(Marker marker, String format, Object arg1, Object arg2)
          Delegate to the appropriate method of the underlying logger.
 void trace(Marker marker, String msg, Throwable t)
          Delegate to the appropriate method of the underlying logger.
 void trace(String msg)
          Delegate to the appropriate method of the underlying logger.
 void trace(String format, Object arg)
          Delegate to the appropriate method of the underlying logger.
 void trace(String format, Object[] argArray)
          Delegate to the appropriate method of the underlying logger.
 void trace(String format, Object arg1, Object arg2)
          Delegate to the appropriate method of the underlying logger.
 void trace(String msg, Throwable t)
          Delegate to the appropriate method of the underlying logger.
 void warn(Marker marker, String msg)
          Delegate to the appropriate method of the underlying logger.
 void warn(Marker marker, String format, Object arg)
          Delegate to the appropriate method of the underlying logger.
 void warn(Marker marker, String format, Object[] argArray)
          Delegate to the appropriate method of the underlying logger.
 void warn(Marker marker, String format, Object arg1, Object arg2)
          Delegate to the appropriate method of the underlying logger.
 void warn(Marker marker, String msg, Throwable t)
          Delegate to the appropriate method of the underlying logger.
 void warn(String msg)
          Delegate to the appropriate method of the underlying logger.
 void warn(String format, Object arg)
          Delegate to the appropriate method of the underlying logger.
 void warn(String format, Object[] argArray)
          Delegate to the appropriate method of the underlying logger.
 void warn(String format, Object arg1, Object arg2)
          Delegate to the appropriate method of the underlying logger.
 void warn(String msg, Throwable t)
          Delegate to the appropriate method of the underlying logger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggerWrapper

public LoggerWrapper(Logger logger,
                     String fqcn)
Method Detail

isTraceEnabled

public boolean isTraceEnabled()
Delegate to the appropriate method of the underlying logger.

Specified by:
isTraceEnabled in interface Logger
Returns:
True if this Logger is enabled for the TRACE level, false otherwise.

isTraceEnabled

public boolean isTraceEnabled(Marker marker)
Delegate to the appropriate method of the underlying logger.

Specified by:
isTraceEnabled in interface Logger
Parameters:
marker - The marker data to take into consideration

trace

public void trace(String msg)
Delegate to the appropriate method of the underlying logger.

Specified by:
trace in interface Logger
Parameters:
msg - the message string to be logged

trace

public void trace(String format,
                  Object arg)
Delegate to the appropriate method of the underlying logger.

Specified by:
trace in interface Logger
Parameters:
format - the format string
arg - the argument

trace

public void trace(String format,
                  Object arg1,
                  Object arg2)
Delegate to the appropriate method of the underlying logger.

Specified by:
trace in interface Logger
Parameters:
format - the format string
arg1 - the first argument
arg2 - the second argument

trace

public void trace(String format,
                  Object[] argArray)
Delegate to the appropriate method of the underlying logger.

Specified by:
trace in interface Logger
Parameters:
format - the format string
argArray - an array of arguments

trace

public void trace(String msg,
                  Throwable t)
Delegate to the appropriate method of the underlying logger.

Specified by:
trace in interface Logger
Parameters:
msg - the message accompanying the exception
t - the exception (throwable) to log

trace

public void trace(Marker marker,
                  String msg)
Delegate to the appropriate method of the underlying logger.

Specified by:
trace in interface Logger
Parameters:
marker - the marker data specific to this log statement
msg - the message string to be logged

trace

public void trace(Marker marker,
                  String format,
                  Object arg)
Delegate to the appropriate method of the underlying logger.

Specified by:
trace in interface Logger
Parameters:
marker - the marker data specific to this log statement
format - the format string
arg - the argument

trace

public void trace(Marker marker,
                  String format,
                  Object arg1,
                  Object arg2)
Delegate to the appropriate method of the underlying logger.

Specified by:
trace in interface Logger
Parameters:
marker - the marker data specific to this log statement
format - the format string
arg1 - the first argument
arg2 - the second argument

trace

public void trace(Marker marker,
                  String format,
                  Object[] argArray)
Delegate to the appropriate method of the underlying logger.

Specified by:
trace in interface Logger
Parameters:
marker - the marker data specific to this log statement
format - the format string
argArray - an array of arguments

trace

public void trace(Marker marker,
                  String msg,
                  Throwable t)
Delegate to the appropriate method of the underlying logger.

Specified by:
trace in interface Logger
Parameters:
marker - the marker data specific to this log statement
msg - the message accompanying the exception
t - the exception (throwable) to log

isDebugEnabled

public boolean isDebugEnabled()
Delegate to the appropriate method of the underlying logger.

Specified by:
isDebugEnabled in interface Logger
Returns:
True if this Logger is enabled for the DEBUG level, false otherwise.

isDebugEnabled

public boolean isDebugEnabled(Marker marker)
Delegate to the appropriate method of the underlying logger.

Specified by:
isDebugEnabled in interface Logger
Parameters:
marker - The marker data to take into consideration

debug

public void debug(String msg)
Delegate to the appropriate method of the underlying logger.

Specified by:
debug in interface Logger
Parameters:
msg - the message string to be logged

debug

public void debug(String format,
                  Object arg)
Delegate to the appropriate method of the underlying logger.

Specified by:
debug in interface Logger
Parameters:
format - the format string
arg - the argument

debug

public void debug(String format,
                  Object arg1,
                  Object arg2)
Delegate to the appropriate method of the underlying logger.

Specified by:
debug in interface Logger
Parameters:
format - the format string
arg1 - the first argument
arg2 - the second argument

debug

public void debug(String format,
                  Object[] argArray)
Delegate to the appropriate method of the underlying logger.

Specified by:
debug in interface Logger
Parameters:
format - the format string
argArray - an array of arguments

debug

public void debug(String msg,
                  Throwable t)
Delegate to the appropriate method of the underlying logger.

Specified by:
debug in interface Logger
Parameters:
msg - the message accompanying the exception
t - the exception (throwable) to log

debug

public void debug(Marker marker,
                  String msg)
Delegate to the appropriate method of the underlying logger.

Specified by:
debug in interface Logger
Parameters:
marker - the marker data specific to this log statement
msg - the message string to be logged

debug

public void debug(Marker marker,
                  String format,
                  Object arg)
Delegate to the appropriate method of the underlying logger.

Specified by:
debug in interface Logger
Parameters:
marker - the marker data specific to this log statement
format - the format string
arg - the argument

debug

public void debug(Marker marker,
                  String format,
                  Object arg1,
                  Object arg2)
Delegate to the appropriate method of the underlying logger.

Specified by:
debug in interface Logger
Parameters:
marker - the marker data specific to this log statement
format - the format string
arg1 - the first argument
arg2 - the second argument

debug

public void debug(Marker marker,
                  String format,
                  Object[] argArray)
Delegate to the appropriate method of the underlying logger.

Specified by:
debug in interface Logger
Parameters:
marker - the marker data specific to this log statement
format - the format string
argArray - an array of arguments

debug

public void debug(Marker marker,
                  String msg,
                  Throwable t)
Delegate to the appropriate method of the underlying logger.

Specified by:
debug in interface Logger
Parameters:
marker - the marker data specific to this log statement
msg - the message accompanying the exception
t - the exception (throwable) to log

isInfoEnabled

public boolean isInfoEnabled()
Delegate to the appropriate method of the underlying logger.

Specified by:
isInfoEnabled in interface Logger
Returns:
True if this Logger is enabled for the INFO level, false otherwise.

isInfoEnabled

public boolean isInfoEnabled(Marker marker)
Delegate to the appropriate method of the underlying logger.

Specified by:
isInfoEnabled in interface Logger
Parameters:
marker - The marker data to take into consideration

info

public void info(String msg)
Delegate to the appropriate method of the underlying logger.

Specified by:
info in interface Logger
Parameters:
msg - the message string to be logged

info

public void info(String format,
                 Object arg)
Delegate to the appropriate method of the underlying logger.

Specified by:
info in interface Logger
Parameters:
format - the format string
arg - the argument

info

public void info(String format,
                 Object arg1,
                 Object arg2)
Delegate to the appropriate method of the underlying logger.

Specified by:
info in interface Logger
Parameters:
format - the format string
arg1 - the first argument
arg2 - the second argument

info

public void info(String format,
                 Object[] argArray)
Delegate to the appropriate method of the underlying logger.

Specified by:
info in interface Logger
Parameters:
format - the format string
argArray - an array of arguments

info

public void info(String msg,
                 Throwable t)
Delegate to the appropriate method of the underlying logger.

Specified by:
info in interface Logger
Parameters:
msg - the message accompanying the exception
t - the exception (throwable) to log

info

public void info(Marker marker,
                 String msg)
Delegate to the appropriate method of the underlying logger.

Specified by:
info in interface Logger
Parameters:
marker - The marker specific to this log statement
msg - the message string to be logged

info

public void info(Marker marker,
                 String format,
                 Object arg)
Delegate to the appropriate method of the underlying logger.

Specified by:
info in interface Logger
Parameters:
marker - the marker data specific to this log statement
format - the format string
arg - the argument

info

public void info(Marker marker,
                 String format,
                 Object arg1,
                 Object arg2)
Delegate to the appropriate method of the underlying logger.

Specified by:
info in interface Logger
Parameters:
marker - the marker data specific to this log statement
format - the format string
arg1 - the first argument
arg2 - the second argument

info

public void info(Marker marker,
                 String format,
                 Object[] argArray)
Delegate to the appropriate method of the underlying logger.

Specified by:
info in interface Logger
Parameters:
marker - the marker data specific to this log statement
format - the format string
argArray - an array of arguments

info

public void info(Marker marker,
                 String msg,
                 Throwable t)
Delegate to the appropriate method of the underlying logger.

Specified by:
info in interface Logger
Parameters:
marker - the marker data for this log statement
msg - the message accompanying the exception
t - the exception (throwable) to log

isWarnEnabled

public boolean isWarnEnabled()
Description copied from interface: Logger
Is the logger instance enabled for the WARN level?

Specified by:
isWarnEnabled in interface Logger
Returns:
True if this Logger is enabled for the WARN level, false otherwise.

isWarnEnabled

public boolean isWarnEnabled(Marker marker)
Delegate to the appropriate method of the underlying logger.

Specified by:
isWarnEnabled in interface Logger
Parameters:
marker - The marker data to take into consideration

warn

public void warn(String msg)
Delegate to the appropriate method of the underlying logger.

Specified by:
warn in interface Logger
Parameters:
msg - the message string to be logged

warn

public void warn(String format,
                 Object arg)
Delegate to the appropriate method of the underlying logger.

Specified by:
warn in interface Logger
Parameters:
format - the format string
arg - the argument

warn

public void warn(String format,
                 Object arg1,
                 Object arg2)
Delegate to the appropriate method of the underlying logger.

Specified by:
warn in interface Logger
Parameters:
format - the format string
arg1 - the first argument
arg2 - the second argument

warn

public void warn(String format,
                 Object[] argArray)
Delegate to the appropriate method of the underlying logger.

Specified by:
warn in interface Logger
Parameters:
format - the format string
argArray - an array of arguments

warn

public void warn(String msg,
                 Throwable t)
Delegate to the appropriate method of the underlying logger.

Specified by:
warn in interface Logger
Parameters:
msg - the message accompanying the exception
t - the exception (throwable) to log

warn

public void warn(Marker marker,
                 String msg)
Delegate to the appropriate method of the underlying logger.

Specified by:
warn in interface Logger
Parameters:
marker - The marker specific to this log statement
msg - the message string to be logged

warn

public void warn(Marker marker,
                 String format,
                 Object arg)
Delegate to the appropriate method of the underlying logger.

Specified by:
warn in interface Logger
Parameters:
marker - the marker data specific to this log statement
format - the format string
arg - the argument

warn

public void warn(Marker marker,
                 String format,
                 Object arg1,
                 Object arg2)
Delegate to the appropriate method of the underlying logger.

Specified by:
warn in interface Logger
Parameters:
marker - the marker data specific to this log statement
format - the format string
arg1 - the first argument
arg2 - the second argument

warn

public void warn(Marker marker,
                 String format,
                 Object[] argArray)
Delegate to the appropriate method of the underlying logger.

Specified by:
warn in interface Logger
Parameters:
marker - the marker data specific to this log statement
format - the format string
argArray - an array of arguments

warn

public void warn(Marker marker,
                 String msg,
                 Throwable t)
Delegate to the appropriate method of the underlying logger.

Specified by:
warn in interface Logger
Parameters:
marker - the marker data for this log statement
msg - the message accompanying the exception
t - the exception (throwable) to log

isErrorEnabled

public boolean isErrorEnabled()
Delegate to the appropriate method of the underlying logger.

Specified by:
isErrorEnabled in interface Logger
Returns:
True if this Logger is enabled for the ERROR level, false otherwise.

isErrorEnabled

public boolean isErrorEnabled(Marker marker)
Delegate to the appropriate method of the underlying logger.

Specified by:
isErrorEnabled in interface Logger
Parameters:
marker - The marker data to take into consideration

error

public void error(String msg)
Delegate to the appropriate method of the underlying logger.

Specified by:
error in interface Logger
Parameters:
msg - the message string to be logged

error

public void error(String format,
                  Object arg)
Delegate to the appropriate method of the underlying logger.

Specified by:
error in interface Logger
Parameters:
format - the format string
arg - the argument

error

public void error(String format,
                  Object arg1,
                  Object arg2)
Delegate to the appropriate method of the underlying logger.

Specified by:
error in interface Logger
Parameters:
format - the format string
arg1 - the first argument
arg2 - the second argument

error

public void error(String format,
                  Object[] argArray)
Delegate to the appropriate method of the underlying logger.

Specified by:
error in interface Logger
Parameters:
format - the format string
argArray - an array of arguments

error

public void error(String msg,
                  Throwable t)
Delegate to the appropriate method of the underlying logger.

Specified by:
error in interface Logger
Parameters:
msg - the message accompanying the exception
t - the exception (throwable) to log

error

public void error(Marker marker,
                  String msg)
Delegate to the appropriate method of the underlying logger.

Specified by:
error in interface Logger
Parameters:
marker - The marker specific to this log statement
msg - the message string to be logged

error

public void error(Marker marker,
                  String format,
                  Object arg)
Delegate to the appropriate method of the underlying logger.

Specified by:
error in interface Logger
Parameters:
marker - the marker data specific to this log statement
format - the format string
arg - the argument

error

public void error(Marker marker,
                  String format,
                  Object arg1,
                  Object arg2)
Delegate to the appropriate method of the underlying logger.

Specified by:
error in interface Logger
Parameters:
marker - the marker data specific to this log statement
format - the format string
arg1 - the first argument
arg2 - the second argument

error

public void error(Marker marker,
                  String format,
                  Object[] argArray)
Delegate to the appropriate method of the underlying logger.

Specified by:
error in interface Logger
Parameters:
marker - the marker data specific to this log statement
format - the format string
argArray - an array of arguments

error

public void error(Marker marker,
                  String msg,
                  Throwable t)
Delegate to the appropriate method of the underlying logger.

Specified by:
error in interface Logger
Parameters:
marker - the marker data specific to this log statement
msg - the message accompanying the exception
t - the exception (throwable) to log

getName

public String getName()
Delegate to the appropriate method of the underlying logger.

Specified by:
getName in interface Logger


Copyright © 2005-2009 QOS.ch. All Rights Reserved.