org.apache.commons.logging.impl

Class SLF4JLocationAwareLog

public class SLF4JLocationAwareLog extends Object implements Log, Serializable

Implementation of org.apache.commons.logging.Log interface which delegates all processing to a wrapped org.slf4j.Logger instance.

JCL's FATAL level is mapped to ERROR. All other levels map one to one.

Author: Ceki Gülcü

Field Summary
protected Stringname
Method Summary
voiddebug(Object message)
Converts the input parameter to String and then delegates to the wrapped org.slf4j.Logger instance.
voiddebug(Object message, Throwable t)
Converts the first input parameter to String and then delegates to the wrapped org.slf4j.Logger instance.
voiderror(Object message)
Converts the input parameter to String and then delegates to the wrapped org.slf4j.Logger instance.
voiderror(Object message, Throwable t)
Converts the first input parameter to String and then delegates to the wrapped org.slf4j.Logger instance.
voidfatal(Object message)
Converts the input parameter to String and then delegates to the error method of the wrapped org.slf4j.Logger instance.
voidfatal(Object message, Throwable t)
Converts the first input parameter to String and then delegates to the error method of the wrapped org.slf4j.Logger instance.
voidinfo(Object message)
Converts the input parameter to String and then delegates to the wrapped org.slf4j.Logger instance.
voidinfo(Object message, Throwable t)
Converts the first input parameter to String and then delegates to the wrapped org.slf4j.Logger instance.
booleanisDebugEnabled()
Directly delegates to the wrapped org.slf4j.Logger instance.
booleanisErrorEnabled()
Directly delegates to the wrapped org.slf4j.Logger instance.
booleanisFatalEnabled()
Delegates to the isErrorEnabled method of the wrapped org.slf4j.Logger instance.
booleanisInfoEnabled()
Directly delegates to the wrapped org.slf4j.Logger instance.
booleanisTraceEnabled()
Delegates to the isTraceEnabled method of the wrapped org.slf4j.Logger instance.
booleanisWarnEnabled()
Directly delegates to the wrapped org.slf4j.Logger instance.
protected ObjectreadResolve()
Replace this instance with a homonymous (same name) logger returned by LoggerFactory.
voidtrace(Object message)
Converts the input parameter to String and then delegates to the debug method of the wrapped org.slf4j.Logger instance.
voidtrace(Object message, Throwable t)
Converts the first input parameter to String and then delegates to the debug method of the wrapped org.slf4j.Logger instance.
voidwarn(Object message)
Converts the input parameter to String and then delegates to the wrapped org.slf4j.Logger instance.
voidwarn(Object message, Throwable t)
Converts the first input parameter to String and then delegates to the wrapped org.slf4j.Logger instance.

Field Detail

name

protected String name

Method Detail

debug

public void debug(Object message)
Converts the input parameter to String and then delegates to the wrapped org.slf4j.Logger instance.

Parameters: message the message to log. Converted to String

debug

public void debug(Object message, Throwable t)
Converts the first input parameter to String and then delegates to the wrapped org.slf4j.Logger instance.

Parameters: message the message to log. Converted to String t the exception to log

error

public void error(Object message)
Converts the input parameter to String and then delegates to the wrapped org.slf4j.Logger instance.

Parameters: message the message to log. Converted to String

error

public void error(Object message, Throwable t)
Converts the first input parameter to String and then delegates to the wrapped org.slf4j.Logger instance.

Parameters: message the message to log. Converted to String t the exception to log

fatal

public void fatal(Object message)
Converts the input parameter to String and then delegates to the error method of the wrapped org.slf4j.Logger instance.

Parameters: message the message to log. Converted to String

fatal

public void fatal(Object message, Throwable t)
Converts the first input parameter to String and then delegates to the error method of the wrapped org.slf4j.Logger instance.

Parameters: message the message to log. Converted to String t the exception to log

info

public void info(Object message)
Converts the input parameter to String and then delegates to the wrapped org.slf4j.Logger instance.

Parameters: message the message to log. Converted to String

info

public void info(Object message, Throwable t)
Converts the first input parameter to String and then delegates to the wrapped org.slf4j.Logger instance.

Parameters: message the message to log. Converted to String t the exception to log

isDebugEnabled

public boolean isDebugEnabled()
Directly delegates to the wrapped org.slf4j.Logger instance.

isErrorEnabled

public boolean isErrorEnabled()
Directly delegates to the wrapped org.slf4j.Logger instance.

isFatalEnabled

public boolean isFatalEnabled()
Delegates to the isErrorEnabled method of the wrapped org.slf4j.Logger instance.

isInfoEnabled

public boolean isInfoEnabled()
Directly delegates to the wrapped org.slf4j.Logger instance.

isTraceEnabled

public boolean isTraceEnabled()
Delegates to the isTraceEnabled method of the wrapped org.slf4j.Logger instance.

isWarnEnabled

public boolean isWarnEnabled()
Directly delegates to the wrapped org.slf4j.Logger instance.

readResolve

protected Object readResolve()
Replace this instance with a homonymous (same name) logger returned by LoggerFactory. Note that this method is only called during deserialization.

Returns: logger with same name as returned by LoggerFactory

Throws: ObjectStreamException

trace

public void trace(Object message)
Converts the input parameter to String and then delegates to the debug method of the wrapped org.slf4j.Logger instance.

Parameters: message the message to log. Converted to String

trace

public void trace(Object message, Throwable t)
Converts the first input parameter to String and then delegates to the debug method of the wrapped org.slf4j.Logger instance.

Parameters: message the message to log. Converted to String t the exception to log

warn

public void warn(Object message)
Converts the input parameter to String and then delegates to the wrapped org.slf4j.Logger instance.

Parameters: message the message to log. Converted to String

warn

public void warn(Object message, Throwable t)
Converts the first input parameter to String and then delegates to the wrapped org.slf4j.Logger instance.

Parameters: message the message to log. Converted to String t the exception to log

Copyright © 2005-2010 QOS.ch. All Rights Reserved.