Package org.slf4j.ext

Class LoggerWrapper

java.lang.Object
org.slf4j.ext.LoggerWrapper
All Implemented Interfaces:
Logger
Direct Known Subclasses:
LocLogger, 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
    Modifier and Type
    Field
    Description
    protected boolean
     
    protected Logger
     

    Fields inherited from interface org.slf4j.Logger

    ROOT_LOGGER_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
    LoggerWrapper​(Logger logger, String fqcn)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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
    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
    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... args)
    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.
    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... args)
    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.
    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... args)
    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.
    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... args)
    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.
    boolean
    Delegate to the appropriate method of the underlying logger.
    boolean
    Delegate to the appropriate method of the underlying logger.
    boolean
    Delegate to the appropriate method of the underlying logger.
    boolean
    Delegate to the appropriate method of the underlying logger.
    boolean
    Delegate to the appropriate method of the underlying logger.
    boolean
    isInfoEnabled​(Marker marker)
    Delegate to the appropriate method of the underlying logger.
    boolean
    Delegate to the appropriate method of the underlying logger.
    boolean
    Delegate to the appropriate method of the underlying logger.
    boolean
     
    boolean
    isWarnEnabled​(Marker marker)
    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... args)
    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
    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... args)
    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
    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... args)
    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.
    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... args)
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.slf4j.Logger

    atDebug, atError, atInfo, atTrace, atWarn, isEnabledForLevel, makeLoggingEventBuilder
  • Field Details

    • logger

      protected final Logger logger
    • instanceofLAL

      protected final boolean instanceofLAL
  • Constructor Details

    • LoggerWrapper

      public LoggerWrapper​(Logger logger, String fqcn)
  • Method Details

    • isTraceEnabled

      public boolean isTraceEnabled()
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      isTraceEnabled in interface Logger
    • isTraceEnabled

      public boolean isTraceEnabled​(Marker marker)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      isTraceEnabled in interface Logger
    • trace

      public void trace​(String msg)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      trace in interface Logger
    • trace

      public void trace​(String format, Object arg)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      trace in interface Logger
    • 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
    • trace

      public void trace​(String format, Object... args)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      trace in interface Logger
    • trace

      public void trace​(String msg, Throwable t)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      trace in interface Logger
    • trace

      public void trace​(Marker marker, String msg)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      trace in interface Logger
    • 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
    • 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
    • trace

      public void trace​(Marker marker, String format, Object... args)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      trace in interface Logger
    • 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
    • isDebugEnabled

      public boolean isDebugEnabled()
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      isDebugEnabled in interface Logger
    • isDebugEnabled

      public boolean isDebugEnabled​(Marker marker)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      isDebugEnabled in interface Logger
    • debug

      public void debug​(String msg)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      debug in interface Logger
    • debug

      public void debug​(String format, Object arg)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      debug in interface Logger
    • 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
    • debug

      public void debug​(String format, Object... argArray)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      debug in interface Logger
    • debug

      public void debug​(String msg, Throwable t)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      debug in interface Logger
    • debug

      public void debug​(Marker marker, String msg)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      debug in interface Logger
    • 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
    • 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
    • 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
    • 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
    • isInfoEnabled

      public boolean isInfoEnabled()
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      isInfoEnabled in interface Logger
    • isInfoEnabled

      public boolean isInfoEnabled​(Marker marker)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      isInfoEnabled in interface Logger
    • info

      public void info​(String msg)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      info in interface Logger
    • info

      public void info​(String format, Object arg)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      info in interface Logger
    • 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
    • info

      public void info​(String format, Object... args)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      info in interface Logger
    • info

      public void info​(String msg, Throwable t)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      info in interface Logger
    • info

      public void info​(Marker marker, String msg)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      info in interface Logger
    • 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
    • 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
    • info

      public void info​(Marker marker, String format, Object... args)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      info in interface Logger
    • 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
    • isWarnEnabled

      public boolean isWarnEnabled()
      Specified by:
      isWarnEnabled in interface Logger
    • isWarnEnabled

      public boolean isWarnEnabled​(Marker marker)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      isWarnEnabled in interface Logger
    • warn

      public void warn​(String msg)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      warn in interface Logger
    • warn

      public void warn​(String format, Object arg)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      warn in interface Logger
    • 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
    • warn

      public void warn​(String format, Object... args)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      warn in interface Logger
    • warn

      public void warn​(String msg, Throwable t)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      warn in interface Logger
    • warn

      public void warn​(Marker marker, String msg)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      warn in interface Logger
    • 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
    • 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
    • warn

      public void warn​(Marker marker, String format, Object... args)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      warn in interface Logger
    • 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
    • isErrorEnabled

      public boolean isErrorEnabled()
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      isErrorEnabled in interface Logger
    • isErrorEnabled

      public boolean isErrorEnabled​(Marker marker)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      isErrorEnabled in interface Logger
    • error

      public void error​(String msg)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      error in interface Logger
    • error

      public void error​(String format, Object arg)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      error in interface Logger
    • 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
    • error

      public void error​(String format, Object... args)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      error in interface Logger
    • error

      public void error​(String msg, Throwable t)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      error in interface Logger
    • error

      public void error​(Marker marker, String msg)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      error in interface Logger
    • 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
    • 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
    • error

      public void error​(Marker marker, String format, Object... args)
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      error in interface Logger
    • 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
    • getName

      public String getName()
      Delegate to the appropriate method of the underlying logger.
      Specified by:
      getName in interface Logger