Home » SLF4J-1.5.8 » org.apache.commons » logging » impl » [javadoc | source]
org.apache.commons.logging.impl
public class: Log4JLogger [javadoc | source]
java.lang.Object
   org.apache.commons.logging.impl.Log4JLogger

All Implemented Interfaces:
    Log, Serializable

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 logger is that in version 1.2 of Log4J:

Log4J1.3 is expected to change Level so it no longer extends Priority, which is a non-binary-compatible change. The class generated by compiling this code against log4j 1.2 will therefore not run against log4j 1.3.
Constructor:
 public Log4JLogger() 
 public Log4JLogger(String name) 
    Base constructor.
 public Log4JLogger(Logger logger) 
    For use with a log4j factory.
Method from org.apache.commons.logging.impl.Log4JLogger Summary:
debug,   debug,   error,   error,   fatal,   fatal,   getLogger,   info,   info,   isDebugEnabled,   isErrorEnabled,   isFatalEnabled,   isInfoEnabled,   isTraceEnabled,   isWarnEnabled,   trace,   trace,   warn,   warn
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.commons.logging.impl.Log4JLogger Detail:
 public  void debug(Object message) 
    Logs a message with org.apache.log4j.Priority.DEBUG.
 public  void debug(Object message,
    Throwable t) 
    Logs a message with org.apache.log4j.Priority.DEBUG.
 public  void error(Object message) 
    Logs a message with org.apache.log4j.Priority.ERROR.
 public  void error(Object message,
    Throwable t) 
    Logs a message with org.apache.log4j.Priority.ERROR.
 public  void fatal(Object message) 
    Logs a message with org.apache.log4j.Priority.FATAL.
 public  void fatal(Object message,
    Throwable t) 
    Logs a message with org.apache.log4j.Priority.FATAL.
 public Logger getLogger() 
    Return the native Logger instance we are using.
 public  void info(Object message) 
    Logs a message with org.apache.log4j.Priority.INFO.
 public  void info(Object message,
    Throwable t) 
    Logs a message with org.apache.log4j.Priority.INFO.
 public boolean isDebugEnabled() 
    Check whether the Log4j Logger used is enabled for DEBUG priority.
 public boolean isErrorEnabled() 
    Check whether the Log4j Logger used is enabled for ERROR priority.
 public boolean isFatalEnabled() 
    Check whether the Log4j Logger used is enabled for FATAL priority.
 public boolean isInfoEnabled() 
    Check whether the Log4j Logger used is enabled for INFO priority.
 public boolean isTraceEnabled() 
    Check whether the Log4j Logger used is enabled for TRACE priority. When using a log4j version that does not support the TRACE level, this call will report whether DEBUG is enabled or not.
 public boolean isWarnEnabled() 
    Check whether the Log4j Logger used is enabled for WARN priority.
 public  void trace(Object message) 
    Logs a message with org.apache.log4j.Priority.TRACE. When using a log4j version that does not support the TRACE level, the message will be logged at the DEBUG level.
 public  void trace(Object message,
    Throwable t) 
    Logs a message with org.apache.log4j.Priority.TRACE. When using a log4j version that does not support the TRACE level, the message will be logged at the DEBUG level.
 public  void warn(Object message) 
    Logs a message with org.apache.log4j.Priority.WARN.
 public  void warn(Object message,
    Throwable t) 
    Logs a message with org.apache.log4j.Priority.WARN.