Package org.apache.commons.logging.impl
Class Log4JLogger
java.lang.Object
org.apache.commons.logging.impl.Log4JLogger
- All Implemented Interfaces:
Serializable
,Log
Deprecated.
Scheduled for removal since version 1.x of Log4j has reached end-of-life.
Implementation of
Log
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
Deprecated.The fully qualified name of the Log4JLogger class.private org.apache.log4j.Logger
Deprecated.Log to this loggerprivate final String
Deprecated.Logger nameprivate static final long
Deprecated.Serializable version identifier.private static final org.apache.log4j.Priority
Deprecated. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Constructs a new instance.Log4JLogger
(String name) Deprecated.Base constructor.Log4JLogger
(org.apache.log4j.Logger logger) Deprecated.For use with a Log4j factory. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.Logs a message withorg.apache.log4j.Priority.DEBUG
.void
Deprecated.Logs a message withorg.apache.log4j.Priority.DEBUG
.void
Deprecated.Logs a message withorg.apache.log4j.Priority.ERROR
.void
Deprecated.Logs a message withorg.apache.log4j.Priority.ERROR
.void
Deprecated.Logs a message withorg.apache.log4j.Priority.FATAL
.void
Deprecated.Logs a message withorg.apache.log4j.Priority.FATAL
.org.apache.log4j.Logger
Deprecated.Gets the native Logger instance we are using.void
Deprecated.Logs a message withorg.apache.log4j.Priority.INFO
.void
Deprecated.Logs a message withorg.apache.log4j.Priority.INFO
.boolean
Deprecated.Tests whether the Log4j Logger used is enabled forDEBUG
priority.boolean
Deprecated.Tests whether the Log4j Logger used is enabled forERROR
priority.boolean
Deprecated.Tests whether the Log4j Logger used is enabled forFATAL
priority.boolean
Deprecated.Tests whether the Log4j Logger used is enabled forINFO
priority.boolean
Deprecated.Tests whether the Log4j Logger used is enabled forTRACE
priority.boolean
Deprecated.Tests whether the Log4j Logger used is enabled forWARN
priority.void
Deprecated.Logs a message withorg.apache.log4j.Priority.TRACE
.void
Deprecated.Logs a message withorg.apache.log4j.Priority.TRACE
.void
Deprecated.Logs a message withorg.apache.log4j.Priority.WARN
.void
Deprecated.Logs a message withorg.apache.log4j.Priority.WARN
.
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDDeprecated.Serializable version identifier.- See Also:
-
FQCN
Deprecated.The fully qualified name of the Log4JLogger class. -
traceLevel
private static final org.apache.log4j.Priority traceLevelDeprecated. -
logger
private transient volatile org.apache.log4j.Logger loggerDeprecated.Log to this logger -
name
Deprecated.Logger name
-
-
Constructor Details
-
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
Deprecated.Base constructor.- Parameters:
name
- name.
-
-
Method Details
-
debug
Deprecated.Logs a message withorg.apache.log4j.Priority.DEBUG
. -
debug
Deprecated.Logs a message withorg.apache.log4j.Priority.DEBUG
. -
error
Deprecated.Logs a message withorg.apache.log4j.Priority.ERROR
. -
error
Deprecated.Logs a message withorg.apache.log4j.Priority.ERROR
. -
fatal
Deprecated.Logs a message withorg.apache.log4j.Priority.FATAL
. -
fatal
Deprecated.Logs a message withorg.apache.log4j.Priority.FATAL
. -
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
Deprecated.Logs a message withorg.apache.log4j.Priority.INFO
. -
info
Deprecated.Logs a message withorg.apache.log4j.Priority.INFO
. -
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
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. -
trace
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. -
warn
Deprecated.Logs a message withorg.apache.log4j.Priority.WARN
. -
warn
Deprecated.Logs a message withorg.apache.log4j.Priority.WARN
.
-