org.apache.commons.logging.impl
public class Log4JLogger extends Object implements Log, Serializable
Implementation of Log that maps directly to a Log4J Logger. Initial configuration of the corresponding Logger instances should be done in the usual manner, as outlined in the Log4J documentation.
Version: $Id: Log4JLogger.java,v 1.11 2004/05/19 21:01:23 rdonkin Exp $
Field Summary | |
---|---|
static String | FQCN The fully qualified name of the Log4JLogger class. |
static boolean | is12 |
Logger | logger Log to this logger |
String | name Logger name |
Constructor Summary | |
---|---|
Log4JLogger() | |
Log4JLogger(String name)
Base constructor. | |
Log4JLogger(Logger logger) For use with a log4j factory. |
Method Summary | |
---|---|
void | debug(Object message)
Log a message to the Log4j Logger with DEBUG priority. |
void | debug(Object message, Throwable t)
Log an error to the Log4j Logger with DEBUG priority. |
void | error(Object message)
Log a message to the Log4j Logger with ERROR priority. |
void | error(Object message, Throwable t)
Log an error to the Log4j Logger with ERROR priority. |
void | fatal(Object message)
Log a message to the Log4j Logger with FATAL priority. |
void | fatal(Object message, Throwable t)
Log an error to the Log4j Logger with FATAL priority. |
Logger | getLogger()
Return the native Logger instance we are using. |
void | info(Object message)
Log a message to the Log4j Logger with INFO priority. |
void | info(Object message, Throwable t)
Log an error to the Log4j Logger with INFO priority. |
boolean | isDebugEnabled()
Check whether the Log4j Logger used is enabled for DEBUG priority. |
boolean | isErrorEnabled()
Check whether the Log4j Logger used is enabled for ERROR priority. |
boolean | isFatalEnabled()
Check whether the Log4j Logger used is enabled for FATAL priority. |
boolean | isInfoEnabled()
Check whether the Log4j Logger used is enabled for INFO priority. |
boolean | isTraceEnabled()
Check whether the Log4j Logger used is enabled for TRACE priority.
|
boolean | isWarnEnabled()
Check whether the Log4j Logger used is enabled for WARN priority. |
void | trace(Object message)
Log a message to the Log4j Logger with TRACE priority.
|
void | trace(Object message, Throwable t)
Log an error to the Log4j Logger with TRACE priority.
|
void | warn(Object message)
Log a message to the Log4j Logger with WARN priority. |
void | warn(Object message, Throwable t)
Log an error to the Log4j Logger with WARN priority. |
DEBUG
priority.DEBUG
priority.ERROR
priority.ERROR
priority.FATAL
priority.FATAL
priority.INFO
priority.INFO
priority.DEBUG
priority.ERROR
priority.FATAL
priority.INFO
priority.TRACE
priority.
For Log4J, this returns the value of isDebugEnabled()
WARN
priority.TRACE
priority.
Currently logs to DEBUG
level in Log4J.TRACE
priority.
Currently logs to DEBUG
level in Log4J.WARN
priority.WARN
priority.