Package org.slf4j.reload4j
Class Reload4jLoggerAdapter
java.lang.Object
org.slf4j.helpers.AbstractLogger
org.slf4j.helpers.LegacyAbstractLogger
org.slf4j.reload4j.Reload4jLoggerAdapter
- All Implemented Interfaces:
Serializable
,Logger
,LocationAwareLogger
,LoggingEventAware
public final class Reload4jLoggerAdapter
extends LegacyAbstractLogger
implements LocationAwareLogger, 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 TypeMethodDescriptionprotected String
protected void
handleNormalizedLoggingCall
(Level level, Marker marker, String msg, Object[] arguments, Throwable throwable) Given various arguments passed as parameters, perform actual logging.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
(LoggingEvent event) Called bySubstituteLogger
or byLoggingEventBuilder
instancesvoid
Printing method with support for location information.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
Is this logger instance enabled for the TRACE level?- Specified by:
isTraceEnabled
in interfaceLogger
- Returns:
- True if this Logger is enabled for level TRACE, false otherwise.
-
isDebugEnabled
Is this logger instance enabled for the DEBUG level?- Specified by:
isDebugEnabled
in interfaceLogger
- Returns:
- True if this Logger is enabled for level DEBUG, false otherwise.
-
isInfoEnabled
Is this logger instance enabled for the INFO level?- Specified by:
isInfoEnabled
in interfaceLogger
- Returns:
- True if this Logger is enabled for the INFO level, false otherwise.
-
isWarnEnabled
Is this logger instance enabled for the WARN level?- Specified by:
isWarnEnabled
in interfaceLogger
- Returns:
- True if this Logger is enabled for the WARN level, false otherwise.
-
isErrorEnabled
Is this logger instance enabled for level ERROR?- Specified by:
isErrorEnabled
in interfaceLogger
- Returns:
- True if this Logger is enabled for level ERROR, false otherwise.
-
log
public void log(Marker marker, String callerFQCN, int level, String msg, Object[] arguments, Throwable t) Description copied from interface:LocationAwareLogger
Printing method with support for location information.- Specified by:
log
in interfaceLocationAwareLogger
- Parameters:
marker
- The marker to be used for this event, may be null.callerFQCN
- The fully qualified class name of the logger instance, typically the logger class, logger bridge or a logger wrapper.level
- One of the level integers defined in this interfacemsg
- The message for the log eventt
- Throwable associated with the log event, may be null.
-
handleNormalizedLoggingCall
protected void handleNormalizedLoggingCall(Level level, Marker marker, String msg, Object[] arguments, Throwable throwable) Description copied from class:AbstractLogger
Given various arguments passed as parameters, perform actual logging.This method assumes that the separation of the args array into actual objects and a throwable has been already operated.
- Specified by:
handleNormalizedLoggingCall
in classAbstractLogger
- Parameters:
level
- the SLF4J level for this eventmarker
- The marker to be used for this event, may be null.msg
- The message pattern which will be parsed and formattedarguments
- the array of arguments to be formatted, may be nullthrowable
- The exception whose stack trace should be logged, may be null
-
log
Called bySubstituteLogger
or byLoggingEventBuilder
instances- Specified by:
log
in interfaceLoggingEventAware
- Parameters:
event
-
-
getFullyQualifiedCallerName
- Specified by:
getFullyQualifiedCallerName
in classAbstractLogger
-