Top Description Fields Constructors Methods
org.slf4j.helpers

public abstract Class AbstractLogger

extends Object
implements Logger, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.slf4j.Logger
Known Direct Subclasses
org.slf4j.helpers.LegacyAbstractLogger
Imports
java.io.ObjectStreamException, .Serializable, org.slf4j.Logger, .LoggerFactory, .Marker, org.slf4j.event.Level

An abstract implementation which delegates actual logging work to the handleNormalizedLoggingCall(Level, Marker, String, Object[], Throwable) method.
Author
Ceki Gülcü
Since
2.0

Field Summary

Modifier and TypeField and Description
protected String
private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
debug(String msg)

Implements org.slf4j.Logger.debug.

Log a message at the DEBUG level.

public void
debug(String format, Object arg)

Implements org.slf4j.Logger.debug.

Log a message at the DEBUG level according to the specified format and argument.

public void
debug(String format, Object arg1, Object arg2)

Implements org.slf4j.Logger.debug.

Log a message at the DEBUG level according to the specified format and arguments.

public void
debug(String format, Object... arguments)

Implements org.slf4j.Logger.debug.

Log a message at the DEBUG level according to the specified format and arguments.

public void
debug(String msg, Throwable t)

Implements org.slf4j.Logger.debug.

Log an exception (throwable) at the DEBUG level with an accompanying message.

public void
debug(Marker marker, String msg)

Implements org.slf4j.Logger.debug.

Log a message with the specific Marker at the DEBUG level.

public void
debug(Marker marker, String format, Object arg)

Implements org.slf4j.Logger.debug.

This method is similar to debug(String, Object) method except that the marker data is also taken into consideration.

public void
debug(Marker marker, String format, Object arg1, Object arg2)

Implements org.slf4j.Logger.debug.

This method is similar to debug(String, Object, Object) method except that the marker data is also taken into consideration.

public void
debug(Marker marker, String format, Object... arguments)

Implements org.slf4j.Logger.debug.

This method is similar to debug(String, Object...) method except that the marker data is also taken into consideration.

public void
debug(Marker marker, String msg, Throwable t)

Implements org.slf4j.Logger.debug.

This method is similar to debug(String, Throwable) method except that the marker data is also taken into consideration.

public void
error(String msg)

Implements org.slf4j.Logger.error.

Log a message at the ERROR level.

public void
error(String format, Object arg)

Implements org.slf4j.Logger.error.

Log a message at the ERROR level according to the specified format and argument.

public void
error(String format, Object arg1, Object arg2)

Implements org.slf4j.Logger.error.

Log a message at the ERROR level according to the specified format and arguments.

public void
error(String format, Object... arguments)

Implements org.slf4j.Logger.error.

Log a message at the ERROR level according to the specified format and arguments.

public void
error(String msg, Throwable t)

Implements org.slf4j.Logger.error.

Log an exception (throwable) at the ERROR level with an accompanying message.

public void
error(Marker marker, String msg)

Implements org.slf4j.Logger.error.

Log a message with the specific Marker at the ERROR level.

public void
error(Marker marker, String format, Object arg)

Implements org.slf4j.Logger.error.

This method is similar to error(String, Object) method except that the marker data is also taken into consideration.

public void
error(Marker marker, String format, Object arg1, Object arg2)

Implements org.slf4j.Logger.error.

This method is similar to error(String, Object, Object) method except that the marker data is also taken into consideration.

public void
error(Marker marker, String format, Object... arguments)

Implements org.slf4j.Logger.error.

This method is similar to error(String, Object...) method except that the marker data is also taken into consideration.

public void
error(Marker marker, String msg, Throwable t)

Implements org.slf4j.Logger.error.

This method is similar to error(String, Throwable) method except that the marker data is also taken into consideration.

protected abstract String
public String
getName()

Implements org.slf4j.Logger.getName.

Return the name of this Logger instance.

private void
handle2ArgsCall(Level level, Marker marker, String msg, Object arg1, Object arg2)

private void
handle_0ArgsCall(Level level, Marker marker, String msg, Throwable t)

private void
handle_1ArgsCall(Level level, Marker marker, String msg, Object arg1)

private void
handleArgArrayCall(Level level, Marker marker, String msg, Object[] args)

protected abstract void
handleNormalizedLoggingCall(Level
the SLF4J level for this event
level
,
Marker
The marker to be used for this event, may be null.
marker
,
String
The message pattern which will be parsed and formatted
messagePattern
,
Object[]
the array of arguments to be formatted, may be null
arguments
,
Throwable
The exception whose stack trace should be logged, may be null
throwable
)

Given various arguments passed as parameters, perform actual logging.

public void
info(String msg)

Implements org.slf4j.Logger.info.

Log a message at the INFO level.

public void
info(String format, Object arg)

Implements org.slf4j.Logger.info.

Log a message at the INFO level according to the specified format and argument.

public void
info(String format, Object arg1, Object arg2)

Implements org.slf4j.Logger.info.

Log a message at the INFO level according to the specified format and arguments.

public void
info(String format, Object... arguments)

Implements org.slf4j.Logger.info.

Log a message at the INFO level according to the specified format and arguments.

public void
info(String msg, Throwable t)

Implements org.slf4j.Logger.info.

Log an exception (throwable) at the INFO level with an accompanying message.

public void
info(Marker marker, String msg)

Implements org.slf4j.Logger.info.

Log a message with the specific Marker at the INFO level.

public void
info(Marker marker, String format, Object arg)

Implements org.slf4j.Logger.info.

This method is similar to info(String, Object) method except that the marker data is also taken into consideration.

public void
info(Marker marker, String format, Object arg1, Object arg2)

Implements org.slf4j.Logger.info.

This method is similar to info(String, Object, Object) method except that the marker data is also taken into consideration.

public void
info(Marker marker, String format, Object... arguments)

Implements org.slf4j.Logger.info.

This method is similar to info(String, Object...) method except that the marker data is also taken into consideration.

public void
info(Marker marker, String msg, Throwable t)

Implements org.slf4j.Logger.info.

This method is similar to info(String, Throwable) method except that the marker data is also taken into consideration.

protected Object

Returns:

logger with same name as returned by LoggerFactory
readResolve
()

Replace this instance with a homonymous (same name) logger returned by LoggerFactory.

public void
trace(String msg)

Implements org.slf4j.Logger.trace.

Log a message at the TRACE level.

public void
trace(String format, Object arg)

Implements org.slf4j.Logger.trace.

Log a message at the TRACE level according to the specified format and argument.

public void
trace(String format, Object arg1, Object arg2)

Implements org.slf4j.Logger.trace.

Log a message at the TRACE level according to the specified format and arguments.

public void
trace(String format, Object... arguments)

Implements org.slf4j.Logger.trace.

Log a message at the TRACE level according to the specified format and arguments.

public void
trace(String msg, Throwable t)

Implements org.slf4j.Logger.trace.

Log an exception (throwable) at the TRACE level with an accompanying message.

public void
trace(Marker marker, String msg)

Implements org.slf4j.Logger.trace.

Log a message with the specific Marker at the TRACE level.

public void
trace(Marker marker, String format, Object arg)

Implements org.slf4j.Logger.trace.

This method is similar to trace(String, Object) method except that the marker data is also taken into consideration.

public void
trace(Marker marker, String format, Object arg1, Object arg2)

Implements org.slf4j.Logger.trace.

This method is similar to trace(String, Object, Object) method except that the marker data is also taken into consideration.

public void
trace(Marker marker, String format, Object... argArray)

Implements org.slf4j.Logger.trace.

This method is similar to trace(String, Object...) method except that the marker data is also taken into consideration.

public void
trace(Marker marker, String msg, Throwable t)

Implements org.slf4j.Logger.trace.

This method is similar to trace(String, Throwable) method except that the marker data is also taken into consideration.

public void
warn(String msg)

Implements org.slf4j.Logger.warn.

Log a message at the WARN level.

public void
warn(String format, Object arg)

Implements org.slf4j.Logger.warn.

Log a message at the WARN level according to the specified format and argument.

public void
warn(String format, Object arg1, Object arg2)

Implements org.slf4j.Logger.warn.

Log a message at the WARN level according to the specified format and arguments.

public void
warn(String format, Object... arguments)

Implements org.slf4j.Logger.warn.

Log a message at the WARN level according to the specified format and arguments.

public void
warn(String msg, Throwable t)

Implements org.slf4j.Logger.warn.

Log an exception (throwable) at the WARN level with an accompanying message.

public void
warn(Marker marker, String msg)

Implements org.slf4j.Logger.warn.

Log a message with the specific Marker at the WARN level.

public void
warn(Marker marker, String format, Object arg)

Implements org.slf4j.Logger.warn.

This method is similar to warn(String, Object) method except that the marker data is also taken into consideration.

public void
warn(Marker marker, String format, Object arg1, Object arg2)

Implements org.slf4j.Logger.warn.

This method is similar to warn(String, Object, Object) method except that the marker data is also taken into consideration.

public void
warn(Marker marker, String format, Object... arguments)

Implements org.slf4j.Logger.warn.

This method is similar to warn(String, Object...) method except that the marker data is also taken into consideration.

public void
warn(Marker marker, String msg, Throwable t)

Implements org.slf4j.Logger.warn.

This method is similar to warn(String, Throwable) method except that the marker data is also taken into consideration.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

nameback to summary
protected String name
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

AbstractLoggerback to summary
public AbstractLogger()

Method Detail

debugback to summary
public void debug(String msg)

Implements org.slf4j.Logger.debug.

Doc from org.slf4j.Logger.debug.

Log a message at the DEBUG level.

debugback to summary
public void debug(String format, Object arg)

Implements org.slf4j.Logger.debug.

Doc from org.slf4j.Logger.debug.

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.

debugback to summary
public void debug(String format, Object arg1, Object arg2)

Implements org.slf4j.Logger.debug.

Doc from org.slf4j.Logger.debug.

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.

debugback to summary
public void debug(String format, Object... arguments)

Implements org.slf4j.Logger.debug.

Doc from org.slf4j.Logger.debug.

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 taking one and two arguments exist solely in order to avoid this hidden cost.

debugback to summary
public void debug(String msg, Throwable t)

Implements org.slf4j.Logger.debug.

Doc from org.slf4j.Logger.debug.

Log an exception (throwable) at the DEBUG level with an accompanying message.

debugback to summary
public void debug(Marker marker, String msg)

Implements org.slf4j.Logger.debug.

Doc from org.slf4j.Logger.debug.

Log a message with the specific Marker at the DEBUG level.

debugback to summary
public void debug(Marker marker, String format, Object arg)

Implements org.slf4j.Logger.debug.

Doc from org.slf4j.Logger.debug.

This method is similar to debug(String, Object) method except that the marker data is also taken into consideration.

debugback to summary
public void debug(Marker marker, String format, Object arg1, Object arg2)

Implements org.slf4j.Logger.debug.

Doc from org.slf4j.Logger.debug.

This method is similar to debug(String, Object, Object) method except that the marker data is also taken into consideration.

debugback to summary
public void debug(Marker marker, String format, Object... arguments)

Implements org.slf4j.Logger.debug.

Doc from org.slf4j.Logger.debug.

This method is similar to debug(String, Object...) method except that the marker data is also taken into consideration.

debugback to summary
public void debug(Marker marker, String msg, Throwable t)

Implements org.slf4j.Logger.debug.

Doc from org.slf4j.Logger.debug.

This method is similar to debug(String, Throwable) method except that the marker data is also taken into consideration.

errorback to summary
public void error(String msg)

Implements org.slf4j.Logger.error.

Doc from org.slf4j.Logger.error.

Log a message at the ERROR level.

errorback to summary
public void error(String format, Object arg)

Implements org.slf4j.Logger.error.

Doc from org.slf4j.Logger.error.

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.

errorback to summary
public void error(String format, Object arg1, Object arg2)

Implements org.slf4j.Logger.error.

Doc from org.slf4j.Logger.error.

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.

errorback to summary
public void error(String format, Object... arguments)

Implements org.slf4j.Logger.error.

Doc from org.slf4j.Logger.error.

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 taking one and two arguments exist solely in order to avoid this hidden cost.

errorback to summary
public void error(String msg, Throwable t)

Implements org.slf4j.Logger.error.

Doc from org.slf4j.Logger.error.

Log an exception (throwable) at the ERROR level with an accompanying message.

errorback to summary
public void error(Marker marker, String msg)

Implements org.slf4j.Logger.error.

Doc from org.slf4j.Logger.error.

Log a message with the specific Marker at the ERROR level.

errorback to summary
public void error(Marker marker, String format, Object arg)

Implements org.slf4j.Logger.error.

Doc from org.slf4j.Logger.error.

This method is similar to error(String, Object) method except that the marker data is also taken into consideration.

errorback to summary
public void error(Marker marker, String format, Object arg1, Object arg2)

Implements org.slf4j.Logger.error.

Doc from org.slf4j.Logger.error.

This method is similar to error(String, Object, Object) method except that the marker data is also taken into consideration.

errorback to summary
public void error(Marker marker, String format, Object... arguments)

Implements org.slf4j.Logger.error.

Doc from org.slf4j.Logger.error.

This method is similar to error(String, Object...) method except that the marker data is also taken into consideration.

errorback to summary
public void error(Marker marker, String msg, Throwable t)

Implements org.slf4j.Logger.error.

Doc from org.slf4j.Logger.error.

This method is similar to error(String, Throwable) method except that the marker data is also taken into consideration.

getFullyQualifiedCallerNameback to summary
protected abstract String getFullyQualifiedCallerName()
getNameback to summary
public String getName()

Implements org.slf4j.Logger.getName.

Doc from org.slf4j.Logger.getName.

Return the name of this Logger instance.

handle2ArgsCallback to summary
private void handle2ArgsCall(Level level, Marker marker, String msg, Object arg1, Object arg2)
handle_0ArgsCallback to summary
private void handle_0ArgsCall(Level level, Marker marker, String msg, Throwable t)
handle_1ArgsCallback to summary
private void handle_1ArgsCall(Level level, Marker marker, String msg, Object arg1)
handleArgArrayCallback to summary
private void handleArgArrayCall(Level level, Marker marker, String msg, Object[] args)
handleNormalizedLoggingCallback to summary
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:Level

the SLF4J level for this event

marker:Marker

The marker to be used for this event, may be null.

messagePattern:String

The message pattern which will be parsed and formatted

arguments:Object[]

the array of arguments to be formatted, may be null

throwable:Throwable

The exception whose stack trace should be logged, may be null

infoback to summary
public void info(String msg)

Implements org.slf4j.Logger.info.

Doc from org.slf4j.Logger.info.

Log a message at the INFO level.

infoback to summary
public void info(String format, Object arg)

Implements org.slf4j.Logger.info.

Doc from org.slf4j.Logger.info.

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.

infoback to summary
public void info(String format, Object arg1, Object arg2)

Implements org.slf4j.Logger.info.

Doc from org.slf4j.Logger.info.

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.

infoback to summary
public void info(String format, Object... arguments)

Implements org.slf4j.Logger.info.

Doc from org.slf4j.Logger.info.

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 taking one and two arguments exist solely in order to avoid this hidden cost.

infoback to summary
public void info(String msg, Throwable t)

Implements org.slf4j.Logger.info.

Doc from org.slf4j.Logger.info.

Log an exception (throwable) at the INFO level with an accompanying message.

infoback to summary
public void info(Marker marker, String msg)

Implements org.slf4j.Logger.info.

Doc from org.slf4j.Logger.info.

Log a message with the specific Marker at the INFO level.

infoback to summary
public void info(Marker marker, String format, Object arg)

Implements org.slf4j.Logger.info.

Doc from org.slf4j.Logger.info.

This method is similar to info(String, Object) method except that the marker data is also taken into consideration.

infoback to summary
public void info(Marker marker, String format, Object arg1, Object arg2)

Implements org.slf4j.Logger.info.

Doc from org.slf4j.Logger.info.

This method is similar to info(String, Object, Object) method except that the marker data is also taken into consideration.

infoback to summary
public void info(Marker marker, String format, Object... arguments)

Implements org.slf4j.Logger.info.

Doc from org.slf4j.Logger.info.

This method is similar to info(String, Object...) method except that the marker data is also taken into consideration.

infoback to summary
public void info(Marker marker, String msg, Throwable t)

Implements org.slf4j.Logger.info.

Doc from org.slf4j.Logger.info.

This method is similar to info(String, Throwable) method except that the marker data is also taken into consideration.

readResolveback to summary
protected Object readResolve() throws ObjectStreamException

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 org.slf4j.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:Object

logger with same name as returned by LoggerFactory

traceback to summary
public void trace(String msg)

Implements org.slf4j.Logger.trace.

Doc from org.slf4j.Logger.trace.

Log a message at the TRACE level.

Annotations
@Override
traceback to summary
public void trace(String format, Object arg)

Implements org.slf4j.Logger.trace.

Doc from org.slf4j.Logger.trace.

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.

Annotations
@Override
traceback to summary
public void trace(String format, Object arg1, Object arg2)

Implements org.slf4j.Logger.trace.

Doc from org.slf4j.Logger.trace.

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.

Annotations
@Override
traceback to summary
public void trace(String format, Object... arguments)

Implements org.slf4j.Logger.trace.

Doc from org.slf4j.Logger.trace.

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 taking one and two arguments exist solely in order to avoid this hidden cost.

Annotations
@Override
traceback to summary
public void trace(String msg, Throwable t)

Implements org.slf4j.Logger.trace.

Doc from org.slf4j.Logger.trace.

Log an exception (throwable) at the TRACE level with an accompanying message.

Annotations
@Override
traceback to summary
public void trace(Marker marker, String msg)

Implements org.slf4j.Logger.trace.

Doc from org.slf4j.Logger.trace.

Log a message with the specific Marker at the TRACE level.

Annotations
@Override
traceback to summary
public void trace(Marker marker, String format, Object arg)

Implements org.slf4j.Logger.trace.

Doc from org.slf4j.Logger.trace.

This method is similar to trace(String, Object) method except that the marker data is also taken into consideration.

Annotations
@Override
traceback to summary
public void trace(Marker marker, String format, Object arg1, Object arg2)

Implements org.slf4j.Logger.trace.

Doc from org.slf4j.Logger.trace.

This method is similar to trace(String, Object, Object) method except that the marker data is also taken into consideration.

Annotations
@Override
traceback to summary
public void trace(Marker marker, String format, Object... argArray)

Implements org.slf4j.Logger.trace.

Doc from org.slf4j.Logger.trace.

This method is similar to trace(String, Object...) method except that the marker data is also taken into consideration.

Annotations
@Override
traceback to summary
public void trace(Marker marker, String msg, Throwable t)

Implements org.slf4j.Logger.trace.

Doc from org.slf4j.Logger.trace.

This method is similar to trace(String, Throwable) method except that the marker data is also taken into consideration.

warnback to summary
public void warn(String msg)

Implements org.slf4j.Logger.warn.

Doc from org.slf4j.Logger.warn.

Log a message at the WARN level.

warnback to summary
public void warn(String format, Object arg)

Implements org.slf4j.Logger.warn.

Doc from org.slf4j.Logger.warn.

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.

warnback to summary
public void warn(String format, Object arg1, Object arg2)

Implements org.slf4j.Logger.warn.

Doc from org.slf4j.Logger.warn.

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.

warnback to summary
public void warn(String format, Object... arguments)

Implements org.slf4j.Logger.warn.

Doc from org.slf4j.Logger.warn.

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 taking one and two arguments exist solely in order to avoid this hidden cost.

warnback to summary
public void warn(String msg, Throwable t)

Implements org.slf4j.Logger.warn.

Doc from org.slf4j.Logger.warn.

Log an exception (throwable) at the WARN level with an accompanying message.

warnback to summary
public void warn(Marker marker, String msg)

Implements org.slf4j.Logger.warn.

Doc from org.slf4j.Logger.warn.

Log a message with the specific Marker at the WARN level.

warnback to summary
public void warn(Marker marker, String format, Object arg)

Implements org.slf4j.Logger.warn.

Doc from org.slf4j.Logger.warn.

This method is similar to warn(String, Object) method except that the marker data is also taken into consideration.

warnback to summary
public void warn(Marker marker, String format, Object arg1, Object arg2)

Implements org.slf4j.Logger.warn.

Doc from org.slf4j.Logger.warn.

This method is similar to warn(String, Object, Object) method except that the marker data is also taken into consideration.

warnback to summary
public void warn(Marker marker, String format, Object... arguments)

Implements org.slf4j.Logger.warn.

Doc from org.slf4j.Logger.warn.

This method is similar to warn(String, Object...) method except that the marker data is also taken into consideration.

warnback to summary
public void warn(Marker marker, String msg, Throwable t)

Implements org.slf4j.Logger.warn.

Doc from org.slf4j.Logger.warn.

This method is similar to warn(String, Throwable) method except that the marker data is also taken into consideration.