Class CommonsLogger

java.lang.Object
org.apache.avalon.framework.logger.CommonsLogger
All Implemented Interfaces:
org.apache.avalon.framework.logger.Logger

public class CommonsLogger extends Object implements org.apache.avalon.framework.logger.Logger
An Avalon Logger implementation backed by a of commons lLogging.
Since:
4.3
Version:
$Id: CommonsLogger.java 233132 2005-08-17 02:32:45 -0500 (Wed, 17 Aug 2005) cziegeler $
Author:
Avalon Development Team
  • Field Details

    • log

      private final org.apache.commons.logging.Log log
    • name

      private final String name
  • Constructor Details

    • CommonsLogger

      public CommonsLogger(org.apache.commons.logging.Log log, String name)
      Construct a CommonsLogger. The constructor needs explicitly the name of the commons-logger, since the commons-logging API misses the functionality to retrieve it from the logger instance.
      Parameters:
      log - The logger of commons-logging.
      name - The name of the logger.
      Since:
      2.0
  • Method Details

    • debug

      public void debug(String message)
      Specified by:
      debug in interface org.apache.avalon.framework.logger.Logger
      See Also:
      • Logger.debug(java.lang.String)
    • debug

      public void debug(String message, Throwable throwable)
      Specified by:
      debug in interface org.apache.avalon.framework.logger.Logger
      See Also:
      • Logger.debug(java.lang.String, java.lang.Throwable)
    • isDebugEnabled

      public boolean isDebugEnabled()
      Specified by:
      isDebugEnabled in interface org.apache.avalon.framework.logger.Logger
      See Also:
      • Logger.isDebugEnabled()
    • info

      public void info(String message)
      Specified by:
      info in interface org.apache.avalon.framework.logger.Logger
      See Also:
      • Logger.info(java.lang.String)
    • info

      public void info(String message, Throwable throwable)
      Specified by:
      info in interface org.apache.avalon.framework.logger.Logger
      See Also:
      • Logger.info(java.lang.String, java.lang.Throwable)
    • isInfoEnabled

      public boolean isInfoEnabled()
      Specified by:
      isInfoEnabled in interface org.apache.avalon.framework.logger.Logger
      See Also:
      • Logger.isInfoEnabled()
    • warn

      public void warn(String message)
      Specified by:
      warn in interface org.apache.avalon.framework.logger.Logger
      See Also:
      • Logger.warn(java.lang.String)
    • warn

      public void warn(String message, Throwable throwable)
      Specified by:
      warn in interface org.apache.avalon.framework.logger.Logger
      See Also:
      • Logger.warn(java.lang.String, java.lang.Throwable)
    • isWarnEnabled

      public boolean isWarnEnabled()
      Specified by:
      isWarnEnabled in interface org.apache.avalon.framework.logger.Logger
      See Also:
      • Logger.isWarnEnabled()
    • error

      public void error(String message)
      Specified by:
      error in interface org.apache.avalon.framework.logger.Logger
      See Also:
      • Logger.error(java.lang.String)
    • error

      public void error(String message, Throwable throwable)
      Specified by:
      error in interface org.apache.avalon.framework.logger.Logger
      See Also:
      • Logger.error(java.lang.String, java.lang.Throwable)
    • isErrorEnabled

      public boolean isErrorEnabled()
      Specified by:
      isErrorEnabled in interface org.apache.avalon.framework.logger.Logger
      See Also:
      • Logger.isErrorEnabled()
    • fatalError

      public void fatalError(String message)
      Specified by:
      fatalError in interface org.apache.avalon.framework.logger.Logger
      See Also:
      • Logger.fatalError(java.lang.String)
    • fatalError

      public void fatalError(String message, Throwable throwable)
      Specified by:
      fatalError in interface org.apache.avalon.framework.logger.Logger
      See Also:
      • Logger.fatalError(java.lang.String, java.lang.Throwable)
    • isFatalErrorEnabled

      public boolean isFatalErrorEnabled()
      Specified by:
      isFatalErrorEnabled in interface org.apache.avalon.framework.logger.Logger
      See Also:
      • Logger.isFatalErrorEnabled()
    • getChildLogger

      public org.apache.avalon.framework.logger.Logger getChildLogger(String name)
      Specified by:
      getChildLogger in interface org.apache.avalon.framework.logger.Logger
      See Also:
      • Logger.getChildLogger(java.lang.String)