Class Reload4jLoggerAdapter

java.lang.Object
org.slf4j.helpers.AbstractLogger
org.slf4j.helpers.LegacyAbstractLogger
org.slf4j.reload4j.Reload4jLoggerAdapter
All Implemented Interfaces:
Serializable, org.slf4j.Logger, org.slf4j.spi.LocationAwareLogger, org.slf4j.spi.LoggingEventAware

public final class Reload4jLoggerAdapter extends org.slf4j.helpers.LegacyAbstractLogger implements org.slf4j.spi.LocationAwareLogger, org.slf4j.spi.LoggingEventAware, Serializable
A wrapper over org.apache.log4j.Logger conforming to the Logger interface.

Note that the logging levels mentioned in this class refer to those defined in the org.apache.log4j.Level class.

This class is a copy-and-paste of Log4j12LoggerAdapter from the slf4j-log4j12 module.

Since:
2.0.0-alpha6
Author:
Ceki Gülcü
See Also:
  • Field Summary

    Fields inherited from class org.slf4j.helpers.AbstractLogger

    name

    Fields inherited from interface org.slf4j.spi.LocationAwareLogger

    DEBUG_INT, ERROR_INT, INFO_INT, TRACE_INT, WARN_INT

    Fields inherited from interface org.slf4j.Logger

    ROOT_LOGGER_NAME
  • Method Summary

    Modifier and Type
    Method
    Description
    protected String
     
    protected void
    handleNormalizedLoggingCall(org.slf4j.event.Level level, org.slf4j.Marker marker, String msg, Object[] arguments, Throwable throwable)
     
    boolean
    Is this logger instance enabled for the DEBUG level?
    boolean
    Is this logger instance enabled for level ERROR?
    boolean
    Is this logger instance enabled for the INFO level?
    boolean
    Is this logger instance enabled for the TRACE level?
    boolean
    Is this logger instance enabled for the WARN level?
    void
    log(org.slf4j.event.LoggingEvent event)
    Called by SubstituteLogger or by LoggingEventBuilder instances
    void
    log(org.slf4j.Marker marker, String callerFQCN, int level, String msg, Object[] arguments, Throwable t)
     

    Methods inherited from class org.slf4j.helpers.LegacyAbstractLogger

    isDebugEnabled, isErrorEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled

    Methods inherited from class org.slf4j.helpers.AbstractLogger

    debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, error, error, error, error, error, error, error, error, error, error, getName, info, info, info, info, info, info, info, info, info, info, readResolve, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn

    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, atLevel, atTrace, atWarn, debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, error, error, error, error, error, error, error, error, error, error, getName, info, info, info, info, info, info, info, info, info, info, isDebugEnabled, isEnabledForLevel, isErrorEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled, makeLoggingEventBuilder, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn
  • Method Details

    • isTraceEnabled

      public boolean isTraceEnabled()
      Is this logger instance enabled for the TRACE level?
      Specified by:
      isTraceEnabled in interface org.slf4j.Logger
      Returns:
      True if this Logger is enabled for level TRACE, false otherwise.
    • isDebugEnabled

      public boolean isDebugEnabled()
      Is this logger instance enabled for the DEBUG level?
      Specified by:
      isDebugEnabled in interface org.slf4j.Logger
      Returns:
      True if this Logger is enabled for level DEBUG, false otherwise.
    • isInfoEnabled

      public boolean isInfoEnabled()
      Is this logger instance enabled for the INFO level?
      Specified by:
      isInfoEnabled in interface org.slf4j.Logger
      Returns:
      True if this Logger is enabled for the INFO level, false otherwise.
    • isWarnEnabled

      public boolean isWarnEnabled()
      Is this logger instance enabled for the WARN level?
      Specified by:
      isWarnEnabled in interface org.slf4j.Logger
      Returns:
      True if this Logger is enabled for the WARN level, false otherwise.
    • isErrorEnabled

      public boolean isErrorEnabled()
      Is this logger instance enabled for level ERROR?
      Specified by:
      isErrorEnabled in interface org.slf4j.Logger
      Returns:
      True if this Logger is enabled for level ERROR, false otherwise.
    • log

      public void log(org.slf4j.Marker marker, String callerFQCN, int level, String msg, Object[] arguments, Throwable t)
      Specified by:
      log in interface org.slf4j.spi.LocationAwareLogger
    • handleNormalizedLoggingCall

      protected void handleNormalizedLoggingCall(org.slf4j.event.Level level, org.slf4j.Marker marker, String msg, Object[] arguments, Throwable throwable)
      Specified by:
      handleNormalizedLoggingCall in class org.slf4j.helpers.AbstractLogger
    • log

      public void log(org.slf4j.event.LoggingEvent event)
      Called by SubstituteLogger or by LoggingEventBuilder instances
      Specified by:
      log in interface org.slf4j.spi.LoggingEventAware
      Parameters:
      event -
    • getFullyQualifiedCallerName

      protected String getFullyQualifiedCallerName()
      Specified by:
      getFullyQualifiedCallerName in class org.slf4j.helpers.AbstractLogger