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.
Implements
Log to map directly to a
Logger for Apache 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 StringDeprecated.The fully qualified name of the Log4JLogger class.private org.apache.log4j.LoggerDeprecated.Log to this loggerprivate final StringDeprecated.Logger nameprivate static final longDeprecated.Serializable version identifier.private static final org.apache.log4j.PriorityDeprecated. -
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 TypeMethodDescriptionvoidDeprecated.Logs a message withorg.apache.log4j.Priority.DEBUG.voidDeprecated.Logs a message withorg.apache.log4j.Priority.DEBUG.voidDeprecated.Logs a message withorg.apache.log4j.Priority.ERROR.voidDeprecated.Logs a message withorg.apache.log4j.Priority.ERROR.voidDeprecated.Logs a message withorg.apache.log4j.Priority.FATAL.voidDeprecated.Logs a message withorg.apache.log4j.Priority.FATAL.org.apache.log4j.LoggerDeprecated.Gets the native Logger instance we are using.voidDeprecated.Logs a message withorg.apache.log4j.Priority.INFO.voidDeprecated.Logs a message withorg.apache.log4j.Priority.INFO.booleanDeprecated.Tests whether the Log4j Logger used is enabled forDEBUGpriority.booleanDeprecated.Tests whether the Log4j Logger used is enabled forERRORpriority.booleanDeprecated.Tests whether the Log4j Logger used is enabled forFATALpriority.booleanDeprecated.Tests whether the Log4j Logger used is enabled forINFOpriority.booleanDeprecated.Tests whether the Log4j Logger used is enabled forTRACEpriority.booleanDeprecated.Tests whether the Log4j Logger used is enabled forWARNpriority.voidDeprecated.Logs a message withorg.apache.log4j.Priority.TRACE.voidDeprecated.Logs a message withorg.apache.log4j.Priority.TRACE.voidDeprecated.Logs a message withorg.apache.log4j.Priority.WARN.voidDeprecated.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 forDEBUGpriority.- Specified by:
isDebugEnabledin interfaceLog- Returns:
- true if debug is enabled in the underlying logger.
-
isErrorEnabled
public boolean isErrorEnabled()Deprecated.Tests whether the Log4j Logger used is enabled forERRORpriority.- Specified by:
isErrorEnabledin interfaceLog- Returns:
- true if error is enabled in the underlying logger.
-
isFatalEnabled
public boolean isFatalEnabled()Deprecated.Tests whether the Log4j Logger used is enabled forFATALpriority.- Specified by:
isFatalEnabledin interfaceLog- Returns:
- true if fatal is enabled in the underlying logger.
-
isInfoEnabled
public boolean isInfoEnabled()Deprecated.Tests whether the Log4j Logger used is enabled forINFOpriority.- Specified by:
isInfoEnabledin interfaceLog- Returns:
- true if info is enabled in the underlying logger.
-
isTraceEnabled
public boolean isTraceEnabled()Deprecated.Tests whether the Log4j Logger used is enabled forTRACEpriority. When using a Log4j version that does not support the TRACE level, this call will report whetherDEBUGis enabled or not.- Specified by:
isTraceEnabledin interfaceLog- Returns:
- true if trace is enabled in the underlying logger.
-
isWarnEnabled
public boolean isWarnEnabled()Deprecated.Tests whether the Log4j Logger used is enabled forWARNpriority.- Specified by:
isWarnEnabledin 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 theTRACElevel, the message will be logged at theDEBUGlevel. -
trace
Deprecated.Logs a message withorg.apache.log4j.Priority.TRACE. When using a Log4j version that does not support theTRACElevel, the message will be logged at theDEBUGlevel. -
warn
Deprecated.Logs a message withorg.apache.log4j.Priority.WARN. -
warn
Deprecated.Logs a message withorg.apache.log4j.Priority.WARN.
-