Package org.slf4j.event
Class EventRecordingLogger
- java.lang.Object
-
- org.slf4j.helpers.AbstractLogger
-
- org.slf4j.helpers.LegacyAbstractLogger
-
- org.slf4j.event.EventRecordingLogger
-
- All Implemented Interfaces:
java.io.Serializable,Logger
public class EventRecordingLogger extends LegacyAbstractLogger
This class is used to record events during the initialization phase of the underlying logging framework. It is called bySubstituteLogger.- Author:
- Ceki Gülcü, Wessel van Norel
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.slf4j.Logger
ROOT_LOGGER_NAME
-
-
Constructor Summary
Constructors Constructor Description EventRecordingLogger(SubstituteLogger logger, java.util.Queue<SubstituteLoggingEvent> eventQueue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringgetFullyQualifiedCallerName()java.lang.StringgetName()Return the name of thisLoggerinstance.protected voidhandleNormalizedLoggingCall(Level level, Marker marker, java.lang.String msg, java.lang.Object[] args, java.lang.Throwable throwable)Given various arguments passed as parameters, perform actual logging.booleanisDebugEnabled()Is the logger instance enabled for the DEBUG level?booleanisErrorEnabled()Is the logger instance enabled for the ERROR level?booleanisInfoEnabled()Is the logger instance enabled for the INFO level?booleanisTraceEnabled()Is the logger instance enabled for the TRACE level?booleanisWarnEnabled()Is the logger instance enabled for the WARN level?-
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, 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, isEnabledForLevel, makeLoggingEventBuilder
-
-
-
-
Constructor Detail
-
EventRecordingLogger
public EventRecordingLogger(SubstituteLogger logger, java.util.Queue<SubstituteLoggingEvent> eventQueue)
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:LoggerReturn the name of thisLoggerinstance.- Specified by:
getNamein interfaceLogger- Overrides:
getNamein classAbstractLogger- Returns:
- name of this logger instance
-
isTraceEnabled
public boolean isTraceEnabled()
Description copied from interface:LoggerIs the logger instance enabled for the TRACE level?- Returns:
- True if this Logger is enabled for the TRACE level, false otherwise.
-
isDebugEnabled
public boolean isDebugEnabled()
Description copied from interface:LoggerIs the logger instance enabled for the DEBUG level?- Returns:
- True if this Logger is enabled for the DEBUG level, false otherwise.
-
isInfoEnabled
public boolean isInfoEnabled()
Description copied from interface:LoggerIs the logger instance enabled for the INFO level?- Returns:
- True if this Logger is enabled for the INFO level, false otherwise.
-
isWarnEnabled
public boolean isWarnEnabled()
Description copied from interface:LoggerIs the logger instance enabled for the WARN level?- Returns:
- True if this Logger is enabled for the WARN level, false otherwise.
-
isErrorEnabled
public boolean isErrorEnabled()
Description copied from interface:LoggerIs the logger instance enabled for the ERROR level?- Returns:
- True if this Logger is enabled for the ERROR level, false otherwise.
-
handleNormalizedLoggingCall
protected void handleNormalizedLoggingCall(Level level, Marker marker, java.lang.String msg, java.lang.Object[] args, java.lang.Throwable throwable)
Description copied from class:AbstractLoggerGiven 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:
handleNormalizedLoggingCallin 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 formattedargs- the array of arguments to be formatted, may be nullthrowable- The exception whose stack trace should be logged, may be null
-
getFullyQualifiedCallerName
protected java.lang.String getFullyQualifiedCallerName()
- Specified by:
getFullyQualifiedCallerNamein classAbstractLogger
-
-