Class JCLLoggerAdapter
- java.lang.Object
-
- org.slf4j.helpers.MarkerIgnoringBase
-
- org.slf4j.impl.JCLLoggerAdapter
-
- All Implemented Interfaces:
Serializable
,Logger
public final class JCLLoggerAdapter extends MarkerIgnoringBase
A wrapper overorg.apache.commons.logging.Log
in conformance with theLogger
interface.- Author:
- Ceki Gülcü
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
name
-
Fields inherited from interface org.slf4j.Logger
ROOT_LOGGER_NAME
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
debug(String msg)
Delegates to theLog.debug(java.lang.Object)
method of the underlyingLog
instance.void
debug(String format, Object arg)
Delegates to theLog.debug(java.lang.Object)
method of the underlyingLog
instance.void
debug(String format, Object... arguments)
Delegates to theLog.debug(java.lang.Object)
method of the underlyingLog
instance.void
debug(String format, Object arg1, Object arg2)
Delegates to theLog.debug(java.lang.Object)
method of the underlyingLog
instance.void
debug(String msg, Throwable t)
Delegates to theLog.debug(java.lang.Object, java.lang.Throwable)
method of the underlyingLog
instance.void
error(String msg)
Delegates to theLog.error(java.lang.Object)
method of the underlyingLog
instance.void
error(String format, Object arg)
Delegates to theLog.error(java.lang.Object)
method of the underlyingLog
instance.void
error(String format, Object... arguments)
Delegates to theLog.error(java.lang.Object)
method of the underlyingLog
instance.void
error(String format, Object arg1, Object arg2)
Delegates to theLog.error(java.lang.Object)
method of the underlyingLog
instance.void
error(String msg, Throwable t)
Delegates to theLog.error(java.lang.Object, java.lang.Throwable)
method of the underlyingLog
instance.String
getName()
Return the name of thisLogger
instance.void
info(String msg)
Delegates to theLog.debug(java.lang.Object)
method of the underlyingLog
instance.void
info(String format, Object arg)
Delegates to theLog.info(java.lang.Object)
method of the underlyingLog
instance.void
info(String format, Object... arguments)
Delegates to theLog.info(java.lang.Object)
method of the underlyingLog
instance.void
info(String format, Object arg1, Object arg2)
Delegates to theLog.info(java.lang.Object)
method of the underlyingLog
instance.void
info(String msg, Throwable t)
Delegates to theLog.info(java.lang.Object, java.lang.Throwable)
method of the underlyingLog
instance.boolean
isDebugEnabled()
Delegates to theLog.isDebugEnabled()
method of the underlyingLog
instance.boolean
isErrorEnabled()
Delegates to theLog.isErrorEnabled()
method of the underlyingLog
instance.boolean
isInfoEnabled()
Delegates to theLog.isInfoEnabled()
method of the underlyingLog
instance.boolean
isTraceEnabled()
Delegates to theLog.isTraceEnabled()
method of the underlyingLog
instance.boolean
isWarnEnabled()
Delegates to theLog.isWarnEnabled()
method of the underlyingLog
instance.protected Object
readResolve()
Replace this instance with a homonymous (same name) logger returned by LoggerFactory.void
trace(String msg)
Delegates to theLog.trace(java.lang.Object)
method of the underlyingLog
instance.void
trace(String format, Object arg)
Delegates to theLog.trace(java.lang.Object)
method of the underlyingLog
instance.void
trace(String format, Object... arguments)
Delegates to theLog.trace(java.lang.Object)
method of the underlyingLog
instance.void
trace(String format, Object arg1, Object arg2)
Delegates to theLog.trace(java.lang.Object)
method of the underlyingLog
instance.void
trace(String msg, Throwable t)
Delegates to theLog.trace(java.lang.Object, java.lang.Throwable)
method of the underlyingLog
instance.void
warn(String msg)
Delegates to theLog.warn(java.lang.Object)
method of the underlyingLog
instance.void
warn(String format, Object arg)
Delegates to theLog.warn(java.lang.Object)
method of the underlyingLog
instance.void
warn(String format, Object... arguments)
Delegates to theLog.warn(java.lang.Object)
method of the underlyingLog
instance.void
warn(String format, Object arg1, Object arg2)
Delegates to theLog.warn(java.lang.Object)
method of the underlyingLog
instance.void
warn(String msg, Throwable t)
Delegates to theLog.warn(java.lang.Object, java.lang.Throwable)
method of the underlyingLog
instance.-
Methods inherited from class org.slf4j.helpers.MarkerIgnoringBase
debug, debug, debug, debug, debug, error, error, error, error, error, info, info, info, info, info, isDebugEnabled, isErrorEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled, toString, trace, trace, trace, trace, trace, warn, warn, warn, warn, warn
-
-
-
-
Field Detail
-
name
protected String name
-
-
Method Detail
-
isTraceEnabled
public boolean isTraceEnabled()
Delegates to theLog.isTraceEnabled()
method of the underlyingLog
instance.- Returns:
- True if this Logger is enabled for the TRACE level, false otherwise.
-
trace
public void trace(String msg)
Delegates to theLog.trace(java.lang.Object)
method of the underlyingLog
instance.- Parameters:
msg
- - the message object to be logged
-
trace
public void trace(String format, Object arg)
Delegates to theLog.trace(java.lang.Object)
method of the underlyingLog
instance.However, this form avoids superfluous object creation when the logger is disabled for level TRACE.
- Parameters:
format
- the format stringarg
- the argument
-
trace
public void trace(String format, Object arg1, Object arg2)
Delegates to theLog.trace(java.lang.Object)
method of the underlyingLog
instance.However, this form avoids superfluous object creation when the logger is disabled for level TRACE.
- Parameters:
format
- the format stringarg1
- the first argumentarg2
- the second argument
-
trace
public void trace(String format, Object... arguments)
Delegates to theLog.trace(java.lang.Object)
method of the underlyingLog
instance.However, this form avoids superfluous object creation when the logger is disabled for level TRACE.
- Parameters:
format
- the format stringarguments
- a list of 3 or more arguments
-
trace
public void trace(String msg, Throwable t)
Delegates to theLog.trace(java.lang.Object, java.lang.Throwable)
method of the underlyingLog
instance.- Parameters:
msg
- the message accompanying the exceptiont
- the exception (throwable) to log
-
isDebugEnabled
public boolean isDebugEnabled()
Delegates to theLog.isDebugEnabled()
method of the underlyingLog
instance.- Returns:
- True if this Logger is enabled for the DEBUG level, false otherwise.
-
debug
public void debug(String msg)
Delegates to theLog.debug(java.lang.Object)
method of the underlyingLog
instance.- Parameters:
msg
- - the message object to be logged
-
debug
public void debug(String format, Object arg)
Delegates to theLog.debug(java.lang.Object)
method of the underlyingLog
instance.However, this form avoids superfluous object creation when the logger is disabled for level DEBUG.
- Parameters:
format
- the format stringarg
- the argument
-
debug
public void debug(String format, Object arg1, Object arg2)
Delegates to theLog.debug(java.lang.Object)
method of the underlyingLog
instance.However, this form avoids superfluous object creation when the logger is disabled for level DEBUG.
- Parameters:
format
- the format stringarg1
- the first argumentarg2
- the second argument
-
debug
public void debug(String format, Object... arguments)
Delegates to theLog.debug(java.lang.Object)
method of the underlyingLog
instance.However, this form avoids superfluous object creation when the logger is disabled for level DEBUG.
- Parameters:
format
- the format stringarguments
- a list of 3 or more arguments
-
debug
public void debug(String msg, Throwable t)
Delegates to theLog.debug(java.lang.Object, java.lang.Throwable)
method of the underlyingLog
instance.- Parameters:
msg
- the message accompanying the exceptiont
- the exception (throwable) to log
-
isInfoEnabled
public boolean isInfoEnabled()
Delegates to theLog.isInfoEnabled()
method of the underlyingLog
instance.- Returns:
- True if this Logger is enabled for the INFO level, false otherwise.
-
info
public void info(String msg)
Delegates to theLog.debug(java.lang.Object)
method of the underlyingLog
instance.- Parameters:
msg
- - the message object to be logged
-
info
public void info(String format, Object arg)
Delegates to theLog.info(java.lang.Object)
method of the underlyingLog
instance.However, this form avoids superfluous object creation when the logger is disabled for level INFO.
- Parameters:
format
- the format stringarg
- the argument
-
info
public void info(String format, Object arg1, Object arg2)
Delegates to theLog.info(java.lang.Object)
method of the underlyingLog
instance.However, this form avoids superfluous object creation when the logger is disabled for level INFO.
- Parameters:
format
- the format stringarg1
- the first argumentarg2
- the second argument
-
info
public void info(String format, Object... arguments)
Delegates to theLog.info(java.lang.Object)
method of the underlyingLog
instance.However, this form avoids superfluous object creation when the logger is disabled for level INFO.
- Parameters:
format
- the format stringarguments
- a list of 3 or more arguments
-
info
public void info(String msg, Throwable t)
Delegates to theLog.info(java.lang.Object, java.lang.Throwable)
method of the underlyingLog
instance.- Parameters:
msg
- the message accompanying the exceptiont
- the exception (throwable) to log
-
isWarnEnabled
public boolean isWarnEnabled()
Delegates to theLog.isWarnEnabled()
method of the underlyingLog
instance.- Returns:
- True if this Logger is enabled for the WARN level, false otherwise.
-
warn
public void warn(String msg)
Delegates to theLog.warn(java.lang.Object)
method of the underlyingLog
instance.- Parameters:
msg
- - the message object to be logged
-
warn
public void warn(String format, Object arg)
Delegates to theLog.warn(java.lang.Object)
method of the underlyingLog
instance.However, this form avoids superfluous object creation when the logger is disabled for level WARN.
- Parameters:
format
- the format stringarg
- the argument
-
warn
public void warn(String format, Object arg1, Object arg2)
Delegates to theLog.warn(java.lang.Object)
method of the underlyingLog
instance.However, this form avoids superfluous object creation when the logger is disabled for level WARN.
- Parameters:
format
- the format stringarg1
- the first argumentarg2
- the second argument
-
warn
public void warn(String format, Object... arguments)
Delegates to theLog.warn(java.lang.Object)
method of the underlyingLog
instance.However, this form avoids superfluous object creation when the logger is disabled for level WARN.
- Parameters:
format
- the format stringarguments
- a list of 3 or more arguments
-
warn
public void warn(String msg, Throwable t)
Delegates to theLog.warn(java.lang.Object, java.lang.Throwable)
method of the underlyingLog
instance.- Parameters:
msg
- the message accompanying the exceptiont
- the exception (throwable) to log
-
isErrorEnabled
public boolean isErrorEnabled()
Delegates to theLog.isErrorEnabled()
method of the underlyingLog
instance.- Returns:
- True if this Logger is enabled for the ERROR level, false otherwise.
-
error
public void error(String msg)
Delegates to theLog.error(java.lang.Object)
method of the underlyingLog
instance.- Parameters:
msg
- - the message object to be logged
-
error
public void error(String format, Object arg)
Delegates to theLog.error(java.lang.Object)
method of the underlyingLog
instance.However, this form avoids superfluous object creation when the logger is disabled for level ERROR.
- Parameters:
format
- the format stringarg
- the argument
-
error
public void error(String format, Object arg1, Object arg2)
Delegates to theLog.error(java.lang.Object)
method of the underlyingLog
instance.However, this form avoids superfluous object creation when the logger is disabled for level ERROR.
- Parameters:
format
- the format stringarg1
- the first argumentarg2
- the second argument
-
error
public void error(String format, Object... arguments)
Delegates to theLog.error(java.lang.Object)
method of the underlyingLog
instance.However, this form avoids superfluous object creation when the logger is disabled for level ERROR.
- Parameters:
format
- the format stringarguments
- a list of 3 or more arguments
-
error
public void error(String msg, Throwable t)
Delegates to theLog.error(java.lang.Object, java.lang.Throwable)
method of the underlyingLog
instance.- Parameters:
msg
- the message accompanying the exceptiont
- the exception (throwable) to log
-
getName
public String getName()
Description copied from interface:Logger
Return the name of thisLogger
instance.
-
readResolve
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 references 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
-
-