public abstract class AbstractLogger extends Object implements Logger, Serializable
handleNormalizedLoggingCall(Level, Marker, String, Object[], Throwable) method.| Modifier and Type | Field and Description |
|---|---|
protected String |
name |
ROOT_LOGGER_NAME| Constructor and Description |
|---|
AbstractLogger() |
| Modifier and Type | Method and Description |
|---|---|
void |
debug(Marker marker,
String msg)
Log a message with the specific Marker at the DEBUG level.
|
void |
debug(Marker marker,
String format,
Object... arguments)
This method is similar to
Logger.debug(String, Object...)
method except that the marker data is also taken into
consideration. |
void |
debug(Marker marker,
String format,
Object arg)
This method is similar to
Logger.debug(String, Object) method except that the
marker data is also taken into consideration. |
void |
debug(Marker marker,
String format,
Object arg1,
Object arg2)
This method is similar to
Logger.debug(String, Object, Object)
method except that the marker data is also taken into
consideration. |
void |
debug(Marker marker,
String msg,
Throwable t)
This method is similar to
Logger.debug(String, Throwable) method except that the
marker data is also taken into consideration. |
void |
debug(String msg)
Log a message at the DEBUG level.
|
void |
debug(String format,
Object... arguments)
Log a message at the DEBUG level according to the specified format
and arguments.
|
void |
debug(String format,
Object arg)
Log a message at the DEBUG level according to the specified format
and argument.
|
void |
debug(String format,
Object arg1,
Object arg2)
Log a message at the DEBUG level according to the specified format
and arguments.
|
void |
debug(String msg,
Throwable t)
Log an exception (throwable) at the DEBUG level with an
accompanying message.
|
void |
error(Marker marker,
String msg)
Log a message with the specific Marker at the ERROR level.
|
void |
error(Marker marker,
String format,
Object... arguments)
This method is similar to
Logger.error(String, Object...)
method except that the marker data is also taken into
consideration. |
void |
error(Marker marker,
String format,
Object arg)
This method is similar to
Logger.error(String, Object) method except that the
marker data is also taken into consideration. |
void |
error(Marker marker,
String format,
Object arg1,
Object arg2)
This method is similar to
Logger.error(String, Object, Object)
method except that the marker data is also taken into
consideration. |
void |
error(Marker marker,
String msg,
Throwable t)
This method is similar to
Logger.error(String, Throwable)
method except that the marker data is also taken into
consideration. |
void |
error(String msg)
Log a message at the ERROR level.
|
void |
error(String format,
Object... arguments)
Log a message at the ERROR level according to the specified format
and arguments.
|
void |
error(String format,
Object arg)
Log a message at the ERROR level according to the specified format
and argument.
|
void |
error(String format,
Object arg1,
Object arg2)
Log a message at the ERROR level according to the specified format
and arguments.
|
void |
error(String msg,
Throwable t)
Log an exception (throwable) at the ERROR level with an
accompanying message.
|
protected abstract String |
getFullyQualifiedCallerName() |
String |
getName()
Return the name of this
Logger instance. |
protected abstract void |
handleNormalizedLoggingCall(Level level,
Marker marker,
String msg,
Object[] arguments,
Throwable throwable)
Given various arguments passed as parameters perform actual logging.
|
void |
info(Marker marker,
String msg)
Log a message with the specific Marker at the INFO level.
|
void |
info(Marker marker,
String format,
Object... arguments)
This method is similar to
Logger.info(String, Object...)
method except that the marker data is also taken into
consideration. |
void |
info(Marker marker,
String format,
Object arg)
This method is similar to
Logger.info(String, Object) method except that the
marker data is also taken into consideration. |
void |
info(Marker marker,
String format,
Object arg1,
Object arg2)
This method is similar to
Logger.info(String, Object, Object)
method except that the marker data is also taken into
consideration. |
void |
info(Marker marker,
String msg,
Throwable t)
This method is similar to
Logger.info(String, Throwable) method
except that the marker data is also taken into consideration. |
void |
info(String msg)
Log a message at the INFO level.
|
void |
info(String format,
Object... arguments)
Log a message at the INFO level according to the specified format
and arguments.
|
void |
info(String format,
Object arg)
Log a message at the INFO level according to the specified format
and argument.
|
void |
info(String format,
Object arg1,
Object arg2)
Log a message at the INFO level according to the specified format
and arguments.
|
void |
info(String msg,
Throwable t)
Log an exception (throwable) at the INFO level with an
accompanying message.
|
protected Object |
readResolve()
Replace this instance with a homonymous (same name) logger returned
by LoggerFactory.
|
void |
trace(Marker marker,
String msg)
Log a message with the specific Marker at the TRACE level.
|
void |
trace(Marker marker,
String format,
Object... argArray)
This method is similar to
Logger.trace(String, Object...)
method except that the marker data is also taken into
consideration. |
void |
trace(Marker marker,
String format,
Object arg)
This method is similar to
Logger.trace(String, Object) method except that the
marker data is also taken into consideration. |
void |
trace(Marker marker,
String format,
Object arg1,
Object arg2)
This method is similar to
Logger.trace(String, Object, Object)
method except that the marker data is also taken into
consideration. |
void |
trace(Marker marker,
String msg,
Throwable t)
This method is similar to
Logger.trace(String, Throwable) method except that the
marker data is also taken into consideration. |
void |
trace(String msg)
Log a message at the TRACE level.
|
void |
trace(String format,
Object... arguments)
Log a message at the TRACE level according to the specified format
and arguments.
|
void |
trace(String format,
Object arg)
Log a message at the TRACE level according to the specified format
and argument.
|
void |
trace(String format,
Object arg1,
Object arg2)
Log a message at the TRACE level according to the specified format
and arguments.
|
void |
trace(String msg,
Throwable t)
Log an exception (throwable) at the TRACE level with an
accompanying message.
|
void |
warn(Marker marker,
String msg)
Log a message with the specific Marker at the WARN level.
|
void |
warn(Marker marker,
String format,
Object... arguments)
This method is similar to
Logger.warn(String, Object...)
method except that the marker data is also taken into
consideration. |
void |
warn(Marker marker,
String format,
Object arg)
This method is similar to
Logger.warn(String, Object) method except that the
marker data is also taken into consideration. |
void |
warn(Marker marker,
String format,
Object arg1,
Object arg2)
This method is similar to
Logger.warn(String, Object, Object)
method except that the marker data is also taken into
consideration. |
void |
warn(Marker marker,
String msg,
Throwable t)
This method is similar to
Logger.warn(String, Throwable) method
except that the marker data is also taken into consideration. |
void |
warn(String msg)
Log a message at the WARN level.
|
void |
warn(String format,
Object... arguments)
Log a message at the WARN level according to the specified format
and arguments.
|
void |
warn(String format,
Object arg)
Log a message at the WARN level according to the specified format
and argument.
|
void |
warn(String format,
Object arg1,
Object arg2)
Log a message at the WARN level according to the specified format
and arguments.
|
void |
warn(String msg,
Throwable t)
Log an exception (throwable) at the WARN level with an
accompanying message.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitatDebug, atError, atInfo, atLevel, atTrace, atWarn, isDebugEnabled, isDebugEnabled, isEnabledForLevel, isErrorEnabled, isErrorEnabled, isInfoEnabled, isInfoEnabled, isTraceEnabled, isTraceEnabled, isWarnEnabled, isWarnEnabled, makeLoggingEventBuilderpublic AbstractLogger()
public String getName()
LoggerLogger instance.protected Object readResolve() throws ObjectStreamException
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.
ObjectStreamExceptionpublic void trace(String msg)
Loggerpublic void trace(String format, Object arg)
LoggerThis form avoids superfluous object creation when the logger is disabled for the TRACE level.
public void trace(String format, Object arg1, Object arg2)
LoggerThis form avoids superfluous object creation when the logger is disabled for the TRACE level.
public void trace(String format, Object... arguments)
LoggerThis 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.
public void trace(String msg, Throwable t)
Loggerpublic void trace(Marker marker, String msg)
Loggerpublic void trace(Marker marker, String format, Object arg)
LoggerLogger.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)
LoggerLogger.trace(String, Object, Object)
method except that the marker data is also taken into
consideration.public void trace(Marker marker, String format, Object... argArray)
LoggerLogger.trace(String, Object...)
method except that the marker data is also taken into
consideration.public void trace(Marker marker, String msg, Throwable t)
LoggerLogger.trace(String, Throwable) method except that the
marker data is also taken into consideration.public void debug(String msg)
Loggerpublic void debug(String format, Object arg)
LoggerThis form avoids superfluous object creation when the logger is disabled for the DEBUG level.
public void debug(String format, Object arg1, Object arg2)
LoggerThis form avoids superfluous object creation when the logger is disabled for the DEBUG level.
public void debug(String format, Object... arguments)
LoggerThis 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.
public void debug(String msg, Throwable t)
Loggerpublic void debug(Marker marker, String msg)
Loggerpublic void debug(Marker marker, String format, Object arg)
LoggerLogger.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)
LoggerLogger.debug(String, Object, Object)
method except that the marker data is also taken into
consideration.public void debug(Marker marker, String format, Object... arguments)
LoggerLogger.debug(String, Object...)
method except that the marker data is also taken into
consideration.public void debug(Marker marker, String msg, Throwable t)
LoggerLogger.debug(String, Throwable) method except that the
marker data is also taken into consideration.public void info(String msg)
Loggerpublic void info(String format, Object arg)
LoggerThis form avoids superfluous object creation when the logger is disabled for the INFO level.
public void info(String format, Object arg1, Object arg2)
LoggerThis form avoids superfluous object creation when the logger is disabled for the INFO level.
public void info(String format, Object... arguments)
LoggerThis 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.
public void info(String msg, Throwable t)
Loggerpublic void info(Marker marker, String msg)
Loggerpublic void info(Marker marker, String format, Object arg)
LoggerLogger.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)
LoggerLogger.info(String, Object, Object)
method except that the marker data is also taken into
consideration.public void info(Marker marker, String format, Object... arguments)
LoggerLogger.info(String, Object...)
method except that the marker data is also taken into
consideration.public void info(Marker marker, String msg, Throwable t)
LoggerLogger.info(String, Throwable) method
except that the marker data is also taken into consideration.public void warn(String msg)
Loggerpublic void warn(String format, Object arg)
LoggerThis form avoids superfluous object creation when the logger is disabled for the WARN level.
public void warn(String format, Object arg1, Object arg2)
LoggerThis form avoids superfluous object creation when the logger is disabled for the WARN level.
public void warn(String format, Object... arguments)
LoggerThis 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.
public void warn(String msg, Throwable t)
Loggerpublic void warn(Marker marker, String msg)
Loggerpublic void warn(Marker marker, String format, Object arg)
LoggerLogger.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)
LoggerLogger.warn(String, Object, Object)
method except that the marker data is also taken into
consideration.public void warn(Marker marker, String format, Object... arguments)
LoggerLogger.warn(String, Object...)
method except that the marker data is also taken into
consideration.public void warn(Marker marker, String msg, Throwable t)
LoggerLogger.warn(String, Throwable) method
except that the marker data is also taken into consideration.public void error(String msg)
Loggerpublic void error(String format, Object arg)
LoggerThis form avoids superfluous object creation when the logger is disabled for the ERROR level.
public void error(String format, Object arg1, Object arg2)
LoggerThis form avoids superfluous object creation when the logger is disabled for the ERROR level.
public void error(String format, Object... arguments)
LoggerThis 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.
public void error(String msg, Throwable t)
Loggerpublic void error(Marker marker, String msg)
Loggerpublic void error(Marker marker, String format, Object arg)
LoggerLogger.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)
LoggerLogger.error(String, Object, Object)
method except that the marker data is also taken into
consideration.public void error(Marker marker, String format, Object... arguments)
LoggerLogger.error(String, Object...)
method except that the marker data is also taken into
consideration.public void error(Marker marker, String msg, Throwable t)
LoggerLogger.error(String, Throwable)
method except that the marker data is also taken into
consideration.protected abstract String getFullyQualifiedCallerName()
protected abstract void handleNormalizedLoggingCall(Level level, Marker marker, String msg, Object[] arguments, Throwable throwable)
This method assumes that the separation of the args array into actual objects and a throwable has been already operated.
level - marker - msg - arguments - throwable - Copyright © 2005–2022 QOS.ch. All rights reserved.