Package org.apache.commons.logging.impl
Class Log4JLogger
- java.lang.Object
-
- org.apache.commons.logging.impl.Log4JLogger
-
- All Implemented Interfaces:
java.io.Serializable
,Log
@Deprecated public class Log4JLogger extends java.lang.Object implements Log, java.io.Serializable
Deprecated.Scheduled for removal since version 1.x of Log4j has reached end-of-life.Implementation ofLog
that maps directly to a Logger for log4J version 1.2.Initial configuration of the corresponding Logger instances should be done in the usual manner, as outlined in the Log4J documentation.
The reason this logger is distinct from the 1.3.0 logger is that in version 1.2 of Log4J:
- class Logger takes Priority parameters not Level parameters.
- class Level extends Priority
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
FQCN
Deprecated.The fully qualified name of the Log4JLogger class.private org.apache.log4j.Logger
logger
Deprecated.Log to this loggerprivate java.lang.String
name
Deprecated.Logger nameprivate static long
serialVersionUID
Deprecated.Serializable version identifier.private static org.apache.log4j.Priority
traceLevel
Deprecated.
-
Constructor Summary
Constructors Constructor Description Log4JLogger()
Deprecated.Constructs a new instance.Log4JLogger(java.lang.String name)
Deprecated.Base constructor.Log4JLogger(org.apache.log4j.Logger logger)
Deprecated.For use with a Log4j factory.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
debug(java.lang.Object message)
Deprecated.Logs a message withorg.apache.log4j.Priority.DEBUG
.void
debug(java.lang.Object message, java.lang.Throwable t)
Deprecated.Logs a message withorg.apache.log4j.Priority.DEBUG
.void
error(java.lang.Object message)
Deprecated.Logs a message withorg.apache.log4j.Priority.ERROR
.void
error(java.lang.Object message, java.lang.Throwable t)
Deprecated.Logs a message withorg.apache.log4j.Priority.ERROR
.void
fatal(java.lang.Object message)
Deprecated.Logs a message withorg.apache.log4j.Priority.FATAL
.void
fatal(java.lang.Object message, java.lang.Throwable t)
Deprecated.Logs a message withorg.apache.log4j.Priority.FATAL
.org.apache.log4j.Logger
getLogger()
Deprecated.Gets the native Logger instance we are using.void
info(java.lang.Object message)
Deprecated.Logs a message withorg.apache.log4j.Priority.INFO
.void
info(java.lang.Object message, java.lang.Throwable t)
Deprecated.Logs a message withorg.apache.log4j.Priority.INFO
.boolean
isDebugEnabled()
Deprecated.Tests whether the Log4j Logger used is enabled forDEBUG
priority.boolean
isErrorEnabled()
Deprecated.Tests whether the Log4j Logger used is enabled forERROR
priority.boolean
isFatalEnabled()
Deprecated.Tests whether the Log4j Logger used is enabled forFATAL
priority.boolean
isInfoEnabled()
Deprecated.Tests whether the Log4j Logger used is enabled forINFO
priority.boolean
isTraceEnabled()
Deprecated.Tests whether the Log4j Logger used is enabled forTRACE
priority.boolean
isWarnEnabled()
Deprecated.Tests whether the Log4j Logger used is enabled forWARN
priority.void
trace(java.lang.Object message)
Deprecated.Logs a message withorg.apache.log4j.Priority.TRACE
.void
trace(java.lang.Object message, java.lang.Throwable t)
Deprecated.Logs a message withorg.apache.log4j.Priority.TRACE
.void
warn(java.lang.Object message)
Deprecated.Logs a message withorg.apache.log4j.Priority.WARN
.void
warn(java.lang.Object message, java.lang.Throwable t)
Deprecated.Logs a message withorg.apache.log4j.Priority.WARN
.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Deprecated.Serializable version identifier.- See Also:
- Constant Field Values
-
FQCN
private static final java.lang.String FQCN
Deprecated.The fully qualified name of the Log4JLogger class.
-
traceLevel
private static final org.apache.log4j.Priority traceLevel
Deprecated.
-
logger
private transient volatile org.apache.log4j.Logger logger
Deprecated.Log to this logger
-
name
private final java.lang.String name
Deprecated.Logger name
-
-
Constructor Detail
-
Log4JLogger
public Log4JLogger()
Deprecated.Constructs a new instance.
-
Log4JLogger
public Log4JLogger(org.apache.log4j.Logger logger)
Deprecated.For use with a Log4j factory.- Parameters:
logger
- Logger.
-
Log4JLogger
public Log4JLogger(java.lang.String name)
Deprecated.Base constructor.- Parameters:
name
- name.
-
-
Method Detail
-
debug
public void debug(java.lang.Object message)
Deprecated.Logs a message withorg.apache.log4j.Priority.DEBUG
.- Specified by:
debug
in interfaceLog
- Parameters:
message
- to log- See Also:
Log.debug(Object)
-
debug
public void debug(java.lang.Object message, java.lang.Throwable t)
Deprecated.Logs a message withorg.apache.log4j.Priority.DEBUG
.- Specified by:
debug
in interfaceLog
- Parameters:
message
- to logt
- log this cause- See Also:
Log.debug(Object, Throwable)
-
error
public void error(java.lang.Object message)
Deprecated.Logs a message withorg.apache.log4j.Priority.ERROR
.- Specified by:
error
in interfaceLog
- Parameters:
message
- to log- See Also:
Log.error(Object)
-
error
public void error(java.lang.Object message, java.lang.Throwable t)
Deprecated.Logs a message withorg.apache.log4j.Priority.ERROR
.- Specified by:
error
in interfaceLog
- Parameters:
message
- to logt
- log this cause- See Also:
Log.error(Object, Throwable)
-
fatal
public void fatal(java.lang.Object message)
Deprecated.Logs a message withorg.apache.log4j.Priority.FATAL
.- Specified by:
fatal
in interfaceLog
- Parameters:
message
- to log- See Also:
Log.fatal(Object)
-
fatal
public void fatal(java.lang.Object message, java.lang.Throwable t)
Deprecated.Logs a message withorg.apache.log4j.Priority.FATAL
.- Specified by:
fatal
in interfaceLog
- Parameters:
message
- to logt
- log this cause- See Also:
Log.fatal(Object, Throwable)
-
getLogger
public org.apache.log4j.Logger getLogger()
Deprecated.Gets the native Logger instance we are using.- Returns:
- the native Logger instance we are using.
-
info
public void info(java.lang.Object message)
Deprecated.Logs a message withorg.apache.log4j.Priority.INFO
.- Specified by:
info
in interfaceLog
- Parameters:
message
- to log- See Also:
Log.info(Object)
-
info
public void info(java.lang.Object message, java.lang.Throwable t)
Deprecated.Logs a message withorg.apache.log4j.Priority.INFO
.- Specified by:
info
in interfaceLog
- Parameters:
message
- to logt
- log this cause- See Also:
Log.info(Object, Throwable)
-
isDebugEnabled
public boolean isDebugEnabled()
Deprecated.Tests whether the Log4j Logger used is enabled forDEBUG
priority.- Specified by:
isDebugEnabled
in interfaceLog
- Returns:
- true if debug is enabled in the underlying logger.
-
isErrorEnabled
public boolean isErrorEnabled()
Deprecated.Tests whether the Log4j Logger used is enabled forERROR
priority.- Specified by:
isErrorEnabled
in interfaceLog
- Returns:
- true if error is enabled in the underlying logger.
-
isFatalEnabled
public boolean isFatalEnabled()
Deprecated.Tests whether the Log4j Logger used is enabled forFATAL
priority.- Specified by:
isFatalEnabled
in interfaceLog
- Returns:
- true if fatal is enabled in the underlying logger.
-
isInfoEnabled
public boolean isInfoEnabled()
Deprecated.Tests whether the Log4j Logger used is enabled forINFO
priority.- Specified by:
isInfoEnabled
in interfaceLog
- Returns:
- true if info is enabled in the underlying logger.
-
isTraceEnabled
public boolean isTraceEnabled()
Deprecated.Tests whether the Log4j Logger used is enabled forTRACE
priority. When using a Log4j version that does not support the TRACE level, this call will report whetherDEBUG
is enabled or not.- Specified by:
isTraceEnabled
in interfaceLog
- Returns:
- true if trace is enabled in the underlying logger.
-
isWarnEnabled
public boolean isWarnEnabled()
Deprecated.Tests whether the Log4j Logger used is enabled forWARN
priority.- Specified by:
isWarnEnabled
in interfaceLog
- Returns:
- true if warn is enabled in the underlying logger.
-
trace
public void trace(java.lang.Object message)
Deprecated.Logs a message withorg.apache.log4j.Priority.TRACE
. When using a Log4j version that does not support theTRACE
level, the message will be logged at theDEBUG
level.- Specified by:
trace
in interfaceLog
- Parameters:
message
- to log- See Also:
Log.trace(Object)
-
trace
public void trace(java.lang.Object message, java.lang.Throwable t)
Deprecated.Logs a message withorg.apache.log4j.Priority.TRACE
. When using a Log4j version that does not support theTRACE
level, the message will be logged at theDEBUG
level.- Specified by:
trace
in interfaceLog
- Parameters:
message
- to logt
- log this cause- See Also:
Log.trace(Object, Throwable)
-
warn
public void warn(java.lang.Object message)
Deprecated.Logs a message withorg.apache.log4j.Priority.WARN
.- Specified by:
warn
in interfaceLog
- Parameters:
message
- to log- See Also:
Log.warn(Object)
-
warn
public void warn(java.lang.Object message, java.lang.Throwable t)
Deprecated.Logs a message withorg.apache.log4j.Priority.WARN
.- Specified by:
warn
in interfaceLog
- Parameters:
message
- to logt
- log this cause- See Also:
Log.warn(Object, Throwable)
-
-