Package org.apache.commons.logging.impl
Class SLF4JLocationAwareLog
- java.lang.Object
-
- org.apache.commons.logging.impl.SLF4JLocationAwareLog
-
- All Implemented Interfaces:
java.io.Serializable,Log
public class SLF4JLocationAwareLog extends java.lang.Object implements Log, java.io.Serializable
Implementation oforg.apache.commons.logging.Loginterface which delegates all processing to a wrappedorg.slf4j.Loggerinstance.JCL's FATAL level is mapped to ERROR. All other levels map one to one.
- Author:
- Ceki Gülcü
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringname
-
Constructor Summary
Constructors Constructor Description SLF4JLocationAwareLog(org.slf4j.spi.LocationAwareLogger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddebug(java.lang.Object message)Converts the input parameter to String and then delegates to the wrappedorg.slf4j.Loggerinstance.voiddebug(java.lang.Object message, java.lang.Throwable t)Converts the first input parameter to String and then delegates to the wrappedorg.slf4j.Loggerinstance.voiderror(java.lang.Object message)Converts the input parameter to String and then delegates to the wrappedorg.slf4j.Loggerinstance.voiderror(java.lang.Object message, java.lang.Throwable t)Converts the first input parameter to String and then delegates to the wrappedorg.slf4j.Loggerinstance.voidfatal(java.lang.Object message)Converts the input parameter to String and then delegates to the error method of the wrappedorg.slf4j.Loggerinstance.voidfatal(java.lang.Object message, java.lang.Throwable t)Converts the first input parameter to String and then delegates to the error method of the wrappedorg.slf4j.Loggerinstance.voidinfo(java.lang.Object message)Converts the input parameter to String and then delegates to the wrappedorg.slf4j.Loggerinstance.voidinfo(java.lang.Object message, java.lang.Throwable t)Converts the first input parameter to String and then delegates to the wrappedorg.slf4j.Loggerinstance.booleanisDebugEnabled()Directly delegates to the wrappedorg.slf4j.Loggerinstance.booleanisErrorEnabled()Directly delegates to the wrappedorg.slf4j.Loggerinstance.booleanisFatalEnabled()Delegates to theisErrorEnabledmethod of the wrappedorg.slf4j.Loggerinstance.booleanisInfoEnabled()Directly delegates to the wrappedorg.slf4j.Loggerinstance.booleanisTraceEnabled()Delegates to theisTraceEnabledmethod of the wrappedorg.slf4j.Loggerinstance.booleanisWarnEnabled()Directly delegates to the wrappedorg.slf4j.Loggerinstance.protected java.lang.ObjectreadResolve()Replace this instance with a homonymous (same name) logger returned by LoggerFactory.voidtrace(java.lang.Object message)Converts the input parameter to String and then delegates to the debug method of the wrappedorg.slf4j.Loggerinstance.voidtrace(java.lang.Object message, java.lang.Throwable t)Converts the first input parameter to String and then delegates to the debug method of the wrappedorg.slf4j.Loggerinstance.voidwarn(java.lang.Object message)Converts the input parameter to String and then delegates to the wrappedorg.slf4j.Loggerinstance.voidwarn(java.lang.Object message, java.lang.Throwable t)Converts the first input parameter to String and then delegates to the wrappedorg.slf4j.Loggerinstance.
-
-
-
Field Detail
-
name
protected java.lang.String name
-
-
Constructor Detail
-
SLF4JLocationAwareLog
public SLF4JLocationAwareLog(org.slf4j.spi.LocationAwareLogger logger)
-
-
Method Detail
-
isTraceEnabled
public boolean isTraceEnabled()
Delegates to theisTraceEnabledmethod of the wrappedorg.slf4j.Loggerinstance.- Specified by:
isTraceEnabledin interfaceLog- Returns:
- true if trace enabled, false otherwise
-
isDebugEnabled
public boolean isDebugEnabled()
Directly delegates to the wrappedorg.slf4j.Loggerinstance.- Specified by:
isDebugEnabledin interfaceLog
-
isInfoEnabled
public boolean isInfoEnabled()
Directly delegates to the wrappedorg.slf4j.Loggerinstance.- Specified by:
isInfoEnabledin interfaceLog- Returns:
- true if info enabled, false otherwise
-
isWarnEnabled
public boolean isWarnEnabled()
Directly delegates to the wrappedorg.slf4j.Loggerinstance.- Specified by:
isWarnEnabledin interfaceLog
-
isErrorEnabled
public boolean isErrorEnabled()
Directly delegates to the wrappedorg.slf4j.Loggerinstance.- Specified by:
isErrorEnabledin interfaceLog
-
isFatalEnabled
public boolean isFatalEnabled()
Delegates to theisErrorEnabledmethod of the wrappedorg.slf4j.Loggerinstance.- Specified by:
isFatalEnabledin interfaceLog
-
trace
public void trace(java.lang.Object message)
Converts the input parameter to String and then delegates to the debug method of the wrappedorg.slf4j.Loggerinstance.
-
trace
public void trace(java.lang.Object message, java.lang.Throwable t)
Converts the first input parameter to String and then delegates to the debug method of the wrappedorg.slf4j.Loggerinstance.
-
debug
public void debug(java.lang.Object message)
Converts the input parameter to String and then delegates to the wrappedorg.slf4j.Loggerinstance.
-
debug
public void debug(java.lang.Object message, java.lang.Throwable t)
Converts the first input parameter to String and then delegates to the wrappedorg.slf4j.Loggerinstance.
-
info
public void info(java.lang.Object message)
Converts the input parameter to String and then delegates to the wrappedorg.slf4j.Loggerinstance.
-
info
public void info(java.lang.Object message, java.lang.Throwable t)
Converts the first input parameter to String and then delegates to the wrappedorg.slf4j.Loggerinstance.
-
warn
public void warn(java.lang.Object message)
Converts the input parameter to String and then delegates to the wrappedorg.slf4j.Loggerinstance.
-
warn
public void warn(java.lang.Object message, java.lang.Throwable t)
Converts the first input parameter to String and then delegates to the wrappedorg.slf4j.Loggerinstance.
-
error
public void error(java.lang.Object message)
Converts the input parameter to String and then delegates to the wrappedorg.slf4j.Loggerinstance.
-
error
public void error(java.lang.Object message, java.lang.Throwable t)
Converts the first input parameter to String and then delegates to the wrappedorg.slf4j.Loggerinstance.
-
fatal
public void fatal(java.lang.Object message)
Converts the input parameter to String and then delegates to the error method of the wrappedorg.slf4j.Loggerinstance.
-
fatal
public void fatal(java.lang.Object message, java.lang.Throwable t)
Converts the first input parameter to String and then delegates to the error method of the wrappedorg.slf4j.Loggerinstance.
-
readResolve
protected java.lang.Object readResolve() throws java.io.ObjectStreamException
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:
java.io.ObjectStreamException
-
-