Class AbstractLogger
- All Implemented Interfaces:
Serializable
,Logger
- Direct Known Subclasses:
LegacyAbstractLogger
handleNormalizedLoggingCall(Level, Marker, String, Object[], Throwable)
method.- Since:
- 2.0
- Author:
- Ceki Gülcü
- See Also:
-
Field Summary
Fields inherited from interface org.slf4j.Logger
ROOT_LOGGER_NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Log a message at the DEBUG level.void
Log a message at the DEBUG level according to the specified format and argument.void
Log a message at the DEBUG level according to the specified format and arguments.void
Log a message at the DEBUG level according to the specified format and arguments.void
Log an exception (throwable) at the DEBUG level with an accompanying message.void
Log a message with the specific Marker at the DEBUG level.void
This method is similar toLogger.debug(String, Object)
method except that the marker data is also taken into consideration.void
This method is similar toLogger.debug(String, Object...)
method except that the marker data is also taken into consideration.void
This method is similar toLogger.debug(String, Object, Object)
method except that the marker data is also taken into consideration.void
This method is similar toLogger.debug(String, Throwable)
method except that the marker data is also taken into consideration.void
Log a message at the ERROR level.void
Log a message at the ERROR level according to the specified format and argument.void
Log a message at the ERROR level according to the specified format and arguments.void
Log a message at the ERROR level according to the specified format and arguments.void
Log an exception (throwable) at the ERROR level with an accompanying message.void
Log a message with the specific Marker at the ERROR level.void
This method is similar toLogger.error(String, Object)
method except that the marker data is also taken into consideration.void
This method is similar toLogger.error(String, Object...)
method except that the marker data is also taken into consideration.void
This method is similar toLogger.error(String, Object, Object)
method except that the marker data is also taken into consideration.void
This method is similar toLogger.error(String, Throwable)
method except that the marker data is also taken into consideration.protected abstract String
getName()
Return the name of thisLogger
instance.protected abstract void
handleNormalizedLoggingCall
(Level level, Marker marker, String messagePattern, Object[] arguments, Throwable throwable) Given various arguments passed as parameters, perform actual logging.void
Log a message at the INFO level.void
Log a message at the INFO level according to the specified format and argument.void
Log a message at the INFO level according to the specified format and arguments.void
Log a message at the INFO level according to the specified format and arguments.void
Log an exception (throwable) at the INFO level with an accompanying message.void
Log a message with the specific Marker at the INFO level.void
This method is similar toLogger.info(String, Object)
method except that the marker data is also taken into consideration.void
This method is similar toLogger.info(String, Object...)
method except that the marker data is also taken into consideration.void
This method is similar toLogger.info(String, Object, Object)
method except that the marker data is also taken into consideration.void
This method is similar toLogger.info(String, Throwable)
method except that the marker data is also taken into consideration.protected Object
Replace this instance with a homonymous (same name) logger returned by LoggerFactory.void
Log a message at the TRACE level.void
Log a message at the TRACE level according to the specified format and argument.void
Log a message at the TRACE level according to the specified format and arguments.void
Log a message at the TRACE level according to the specified format and arguments.void
Log an exception (throwable) at the TRACE level with an accompanying message.void
Log a message with the specific Marker at the TRACE level.void
This method is similar toLogger.trace(String, Object)
method except that the marker data is also taken into consideration.void
This method is similar toLogger.trace(String, Object...)
method except that the marker data is also taken into consideration.void
This method is similar toLogger.trace(String, Object, Object)
method except that the marker data is also taken into consideration.void
This method is similar toLogger.trace(String, Throwable)
method except that the marker data is also taken into consideration.void
Log a message at the WARN level.void
Log a message at the WARN level according to the specified format and argument.void
Log a message at the WARN level according to the specified format and arguments.void
Log a message at the WARN level according to the specified format and arguments.void
Log an exception (throwable) at the WARN level with an accompanying message.void
Log a message with the specific Marker at the WARN level.void
This method is similar toLogger.warn(String, Object)
method except that the marker data is also taken into consideration.void
This method is similar toLogger.warn(String, Object...)
method except that the marker data is also taken into consideration.void
This method is similar toLogger.warn(String, Object, Object)
method except that the marker data is also taken into consideration.void
This method is similar toLogger.warn(String, Throwable)
method except that the marker data is also taken into consideration.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, isDebugEnabled, isDebugEnabled, isEnabledForLevel, isErrorEnabled, isErrorEnabled, isInfoEnabled, isInfoEnabled, isTraceEnabled, isTraceEnabled, isWarnEnabled, isWarnEnabled, makeLoggingEventBuilder
-
Field Details
-
name
-
-
Constructor Details
-
AbstractLogger
public AbstractLogger()
-
-
Method Details
-
getName
Description copied from interface:Logger
Return the name of thisLogger
instance. -
readResolve
Replace this instance with a homonymous (same name) logger returned by LoggerFactory. Note that this method is only called during deserialization.This approach will work well if the desired ILoggerFactory is the one referenced by
LoggerFactory
However, if the user manages its logger hierarchy through a different (non-static) mechanism, e.g. dependency injection, then this approach would be mostly counterproductive.- Returns:
- logger with same name as returned by LoggerFactory
- Throws:
ObjectStreamException
-
trace
Description copied from interface:Logger
Log a message at the TRACE level. -
trace
Description copied from interface:Logger
Log a message at the TRACE level according to the specified format and argument.This form avoids superfluous object creation when the logger is disabled for the TRACE level.
-
trace
Description copied from interface:Logger
Log a message at the TRACE level according to the specified format and arguments.This form avoids superfluous object creation when the logger is disabled for the TRACE level.
-
trace
Description copied from interface:Logger
Log a message at the TRACE level according to the specified format and arguments.This form avoids superfluous string concatenation when the logger is disabled for the TRACE level. However, this variant incurs the hidden (and relatively small) cost of creating an
Object[]
before invoking the method, even if this logger is disabled for TRACE. The variants takingone
andtwo
arguments exist solely in order to avoid this hidden cost. -
trace
Description copied from interface:Logger
Log an exception (throwable) at the TRACE level with an accompanying message. -
trace
Description copied from interface:Logger
Log a message with the specific Marker at the TRACE level. -
trace
Description copied from interface:Logger
This method is similar toLogger.trace(String, Object)
method except that the marker data is also taken into consideration. -
trace
Description copied from interface:Logger
This method is similar toLogger.trace(String, Object, Object)
method except that the marker data is also taken into consideration. -
trace
Description copied from interface:Logger
This method is similar toLogger.trace(String, Object...)
method except that the marker data is also taken into consideration. -
trace
Description copied from interface:Logger
This method is similar toLogger.trace(String, Throwable)
method except that the marker data is also taken into consideration. -
debug
Description copied from interface:Logger
Log a message at the DEBUG level. -
debug
Description copied from interface:Logger
Log a message at the DEBUG level according to the specified format and argument.This form avoids superfluous object creation when the logger is disabled for the DEBUG level.
-
debug
Description copied from interface:Logger
Log a message at the DEBUG level according to the specified format and arguments.This form avoids superfluous object creation when the logger is disabled for the DEBUG level.
-
debug
Description copied from interface:Logger
Log a message at the DEBUG level according to the specified format and arguments.This form avoids superfluous string concatenation when the logger is disabled for the DEBUG level. However, this variant incurs the hidden (and relatively small) cost of creating an
Object[]
before invoking the method, even if this logger is disabled for DEBUG. The variants takingone
andtwo
arguments exist solely in order to avoid this hidden cost. -
debug
Description copied from interface:Logger
Log an exception (throwable) at the DEBUG level with an accompanying message. -
debug
Description copied from interface:Logger
Log a message with the specific Marker at the DEBUG level. -
debug
Description copied from interface:Logger
This method is similar toLogger.debug(String, Object)
method except that the marker data is also taken into consideration. -
debug
Description copied from interface:Logger
This method is similar toLogger.debug(String, Object, Object)
method except that the marker data is also taken into consideration. -
debug
Description copied from interface:Logger
This method is similar toLogger.debug(String, Object...)
method except that the marker data is also taken into consideration. -
debug
Description copied from interface:Logger
This method is similar toLogger.debug(String, Throwable)
method except that the marker data is also taken into consideration. -
info
Description copied from interface:Logger
Log a message at the INFO level. -
info
Description copied from interface:Logger
Log a message at the INFO level according to the specified format and argument.This form avoids superfluous object creation when the logger is disabled for the INFO level.
-
info
Description copied from interface:Logger
Log a message at the INFO level according to the specified format and arguments.This form avoids superfluous object creation when the logger is disabled for the INFO level.
-
info
Description copied from interface:Logger
Log a message at the INFO level according to the specified format and arguments.This form avoids superfluous string concatenation when the logger is disabled for the INFO level. However, this variant incurs the hidden (and relatively small) cost of creating an
Object[]
before invoking the method, even if this logger is disabled for INFO. The variants takingone
andtwo
arguments exist solely in order to avoid this hidden cost. -
info
Description copied from interface:Logger
Log an exception (throwable) at the INFO level with an accompanying message. -
info
Description copied from interface:Logger
Log a message with the specific Marker at the INFO level. -
info
Description copied from interface:Logger
This method is similar toLogger.info(String, Object)
method except that the marker data is also taken into consideration. -
info
Description copied from interface:Logger
This method is similar toLogger.info(String, Object, Object)
method except that the marker data is also taken into consideration. -
info
Description copied from interface:Logger
This method is similar toLogger.info(String, Object...)
method except that the marker data is also taken into consideration. -
info
Description copied from interface:Logger
This method is similar toLogger.info(String, Throwable)
method except that the marker data is also taken into consideration. -
warn
Description copied from interface:Logger
Log a message at the WARN level. -
warn
Description copied from interface:Logger
Log a message at the WARN level according to the specified format and argument.This form avoids superfluous object creation when the logger is disabled for the WARN level.
-
warn
Description copied from interface:Logger
Log a message at the WARN level according to the specified format and arguments.This form avoids superfluous object creation when the logger is disabled for the WARN level.
-
warn
Description copied from interface:Logger
Log a message at the WARN level according to the specified format and arguments.This form avoids superfluous string concatenation when the logger is disabled for the WARN level. However, this variant incurs the hidden (and relatively small) cost of creating an
Object[]
before invoking the method, even if this logger is disabled for WARN. The variants takingone
andtwo
arguments exist solely in order to avoid this hidden cost. -
warn
Description copied from interface:Logger
Log an exception (throwable) at the WARN level with an accompanying message. -
warn
Description copied from interface:Logger
Log a message with the specific Marker at the WARN level. -
warn
Description copied from interface:Logger
This method is similar toLogger.warn(String, Object)
method except that the marker data is also taken into consideration. -
warn
Description copied from interface:Logger
This method is similar toLogger.warn(String, Object, Object)
method except that the marker data is also taken into consideration. -
warn
Description copied from interface:Logger
This method is similar toLogger.warn(String, Object...)
method except that the marker data is also taken into consideration. -
warn
Description copied from interface:Logger
This method is similar toLogger.warn(String, Throwable)
method except that the marker data is also taken into consideration. -
error
Description copied from interface:Logger
Log a message at the ERROR level. -
error
Description copied from interface:Logger
Log a message at the ERROR level according to the specified format and argument.This form avoids superfluous object creation when the logger is disabled for the ERROR level.
-
error
Description copied from interface:Logger
Log a message at the ERROR level according to the specified format and arguments.This form avoids superfluous object creation when the logger is disabled for the ERROR level.
-
error
Description copied from interface:Logger
Log a message at the ERROR level according to the specified format and arguments.This form avoids superfluous string concatenation when the logger is disabled for the ERROR level. However, this variant incurs the hidden (and relatively small) cost of creating an
Object[]
before invoking the method, even if this logger is disabled for ERROR. The variants takingone
andtwo
arguments exist solely in order to avoid this hidden cost. -
error
Description copied from interface:Logger
Log an exception (throwable) at the ERROR level with an accompanying message. -
error
Description copied from interface:Logger
Log a message with the specific Marker at the ERROR level. -
error
Description copied from interface:Logger
This method is similar toLogger.error(String, Object)
method except that the marker data is also taken into consideration. -
error
Description copied from interface:Logger
This method is similar toLogger.error(String, Object, Object)
method except that the marker data is also taken into consideration. -
error
Description copied from interface:Logger
This method is similar toLogger.error(String, Object...)
method except that the marker data is also taken into consideration. -
error
Description copied from interface:Logger
This method is similar toLogger.error(String, Throwable)
method except that the marker data is also taken into consideration. -
getFullyQualifiedCallerName
-
handleNormalizedLoggingCall
protected abstract void handleNormalizedLoggingCall(Level level, Marker marker, String messagePattern, Object[] arguments, Throwable throwable) 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.
- Parameters:
level
- the SLF4J level for this eventmarker
- The marker to be used for this event, may be null.messagePattern
- 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
-