Package org.apache.commons.logging.impl

# Class AvalonLogger

java.lang.Object
org.apache.commons.logging.impl.AvalonLogger

All Implemented Interfaces:
  `Log`

@Deprecated public class AvalonLogger extends Object implements Log
Deprecated.
Scheduled for removal because the Apache Avalon Project has been discontinued.
Implements Commons Logging's Log interface to delegate all logging calls to the Avalon logging abstraction: the Logger interface.

There are two ways in which this class can be used:

- the instance can be constructed with an Avalon logger (by calling `AvalonLogger(Logger)`). In this case, it acts as a simple thin wrapping implementation over the logger. This is particularly useful when using a property setter.
- the `setDefaultLogger(org.apache.avalon.framework.logger.Logger)` class property can be called which sets the ancestral Avalon logger for this class. Any `AvalonLogger` instances created through the `LogFactory` mechanisms will output to child loggers of this `Logger`.

Note: `AvalonLogger` does not implement Serializable because the constructors available for it make this impossible to achieve in all circumstances; there is no way to "reconnect" to an underlying Logger object on deserialization if one was just passed in to the constructor of the original object. This class was marked Serializable in the 1.0.4 release of commons-logging, but this never actually worked (a NullPointerException would be thrown as soon as the deserialized object was used), so removing this marker is not considered to be an incompatible change.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AvalonLogger(String name)`
  Deprecated.
  Constructs an `AvalonLogger` that will log to a child of the `Logger` set by calling `setDefaultLogger(org.apache.avalon.framework.logger.Logger)`.
  `AvalonLogger(org.apache.avalon.framework.logger.Logger logger)`
  Deprecated.
  Constructs an `AvalonLogger` that outputs to the given `Logger` instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `debug(Object message)`
  Deprecated.
  Logs a message with `org.apache.avalon.framework.logger.Logger.debug`.
  `void`
  `debug(Object message, Throwable t)`
  Deprecated.
  Logs a message with `org.apache.avalon.framework.logger.Logger.debug`.
  `void`
  `error(Object message)`
  Deprecated.
  Logs a message with `org.apache.avalon.framework.logger.Logger.error`.
  `void`
  `error(Object message, Throwable t)`
  Deprecated.
  Logs a message with `org.apache.avalon.framework.logger.Logger.error`.
  `void`
  `fatal(Object message)`
  Deprecated.
  Logs a message with `org.apache.avalon.framework.logger.Logger.fatalError`.
  `void`
  `fatal(Object message, Throwable t)`
  Deprecated.
  Logs a message with `org.apache.avalon.framework.logger.Logger.fatalError`.
  `org.apache.avalon.framework.logger.Logger`
  `getLogger()`
  Deprecated.
  Gets the Avalon logger implementation used to perform logging.
  `void`
  `info(Object message)`
  Deprecated.
  Logs a message with `org.apache.avalon.framework.logger.Logger.info`.
  `void`
  `info(Object message, Throwable t)`
  Deprecated.
  Logs a message with `org.apache.avalon.framework.logger.Logger.info`.
  `boolean`
  `isDebugEnabled()`
  Deprecated.
  Is logging to `org.apache.avalon.framework.logger.Logger.debug` enabled?
  `boolean`
  `isErrorEnabled()`
  Deprecated.
  Is logging to `org.apache.avalon.framework.logger.Logger.error` enabled?
  `boolean`
  `isFatalEnabled()`
  Deprecated.
  Is logging to `org.apache.avalon.framework.logger.Logger.fatalError` enabled?
  `boolean`
  `isInfoEnabled()`
  Deprecated.
  Is logging to `org.apache.avalon.framework.logger.Logger.info` enabled?
  `boolean`
  `isTraceEnabled()`
  Deprecated.
  Is logging to `org.apache.avalon.framework.logger.Logger.debug` enabled?
  `boolean`
  `isWarnEnabled()`
  Deprecated.
  Is logging to `org.apache.avalon.framework.logger.Logger.warn` enabled?
  `static void`
  `setDefaultLogger(org.apache.avalon.framework.logger.Logger logger)`
  Deprecated.
  Sets the ancestral Avalon logger from which the delegating loggers will descend.
  `void`
  `trace(Object message)`
  Deprecated.
  Logs a message with `org.apache.avalon.framework.logger.Logger.debug`.
  `void`
  `trace(Object message, Throwable t)`
  Deprecated.
  Logs a message with `org.apache.avalon.framework.logger.Logger.debug`.
  `void`
  `warn(Object message)`
  Deprecated.
  Logs a message with `org.apache.avalon.framework.logger.Logger.warn`.
  `void`
  `warn(Object message, Throwable t)`
  Deprecated.
  Logs a message with `org.apache.avalon.framework.logger.Logger.warn`.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AvalonLogger

    public AvalonLogger(org.apache.avalon.framework.logger.Logger logger)
    Deprecated.
    Constructs an `AvalonLogger` that outputs to the given `Logger` instance.
    Parameters:
      `logger` - the Avalon logger implementation to delegate to

  - ### AvalonLogger

    public AvalonLogger(String name)
    Deprecated.
    Constructs an `AvalonLogger` that will log to a child of the `Logger` set by calling `setDefaultLogger(org.apache.avalon.framework.logger.Logger)`.
    Parameters:
      `name` - the name of the avalon logger implementation to delegate to

- ## Method Details

  - ### setDefaultLogger

    public static void setDefaultLogger(org.apache.avalon.framework.logger.Logger logger)
    Deprecated.
    Sets the ancestral Avalon logger from which the delegating loggers will descend.
    Parameters:
      `logger` - the default avalon logger, in case there is no logger instance supplied in constructor

  - ### debug

    public void debug(Object message)
    Deprecated.
    Logs a message with `org.apache.avalon.framework.logger.Logger.debug`.
    Specified by:
      `debug` in interface `Log`
    Parameters:
      `message` - to log.
    See Also:
      - `Log.debug(Object)`

  - ### debug

    public void debug(Object message, Throwable t)
    Deprecated.
    Logs a message with `org.apache.avalon.framework.logger.Logger.debug`.
    Specified by:
      `debug` in interface `Log`
    Parameters:
      `message` - to log
      `t` - log this cause
    See Also:
      - `Log.debug(Object, Throwable)`

  - ### error

    public void error(Object message)
    Deprecated.
    Logs a message with `org.apache.avalon.framework.logger.Logger.error`.
    Specified by:
      `error` in interface `Log`
    Parameters:
      `message` - to log
    See Also:
      - `Log.error(Object)`

  - ### error

    public void error(Object message, Throwable t)
    Deprecated.
    Logs a message with `org.apache.avalon.framework.logger.Logger.error`.
    Specified by:
      `error` in interface `Log`
    Parameters:
      `message` - to log
      `t` - log this cause
    See Also:
      - `Log.error(Object, Throwable)`

  - ### fatal

    public void fatal(Object message)
    Deprecated.
    Logs a message with `org.apache.avalon.framework.logger.Logger.fatalError`.
    Specified by:
      `fatal` in interface `Log`
    Parameters:
      `message` - to log
    See Also:
      - `Log.fatal(Object)`

  - ### fatal

    public void fatal(Object message, Throwable t)
    Deprecated.
    Logs a message with `org.apache.avalon.framework.logger.Logger.fatalError`.
    Specified by:
      `fatal` in interface `Log`
    Parameters:
      `message` - to log.
      `t` - log this cause.
    See Also:
      - `Log.fatal(Object, Throwable)`

  - ### getLogger

    public org.apache.avalon.framework.logger.Logger getLogger()
    Deprecated.
    Gets the Avalon logger implementation used to perform logging.
    Returns:
      avalon logger implementation

  - ### info

    public void info(Object message)
    Deprecated.
    Logs a message with `org.apache.avalon.framework.logger.Logger.info`.
    Specified by:
      `info` in interface `Log`
    Parameters:
      `message` - to log
    See Also:
      - `Log.info(Object)`

  - ### info

    public void info(Object message, Throwable t)
    Deprecated.
    Logs a message with `org.apache.avalon.framework.logger.Logger.info`.
    Specified by:
      `info` in interface `Log`
    Parameters:
      `message` - to log
      `t` - log this cause
    See Also:
      - `Log.info(Object, Throwable)`

  - ### isDebugEnabled

    public boolean isDebugEnabled()
    Deprecated.
    Is logging to `org.apache.avalon.framework.logger.Logger.debug` enabled?
    Specified by:
      `isDebugEnabled` in interface `Log`
    Returns:
      true if debug is enabled in the underlying logger.
    See Also:
      - `Log.isDebugEnabled()`

  - ### isErrorEnabled

    public boolean isErrorEnabled()
    Deprecated.
    Is logging to `org.apache.avalon.framework.logger.Logger.error` enabled?
    Specified by:
      `isErrorEnabled` in interface `Log`
    Returns:
      true if error is enabled in the underlying logger.
    See Also:
      - `Log.isErrorEnabled()`

  - ### isFatalEnabled

    public boolean isFatalEnabled()
    Deprecated.
    Is logging to `org.apache.avalon.framework.logger.Logger.fatalError` enabled?
    Specified by:
      `isFatalEnabled` in interface `Log`
    Returns:
      true if fatal is enabled in the underlying logger.
    See Also:
      - `Log.isFatalEnabled()`

  - ### isInfoEnabled

    public boolean isInfoEnabled()
    Deprecated.
    Is logging to `org.apache.avalon.framework.logger.Logger.info` enabled?
    Specified by:
      `isInfoEnabled` in interface `Log`
    Returns:
      true if info is enabled in the underlying logger.
    See Also:
      - `Log.isInfoEnabled()`

  - ### isTraceEnabled

    public boolean isTraceEnabled()
    Deprecated.
    Is logging to `org.apache.avalon.framework.logger.Logger.debug` enabled?
    Specified by:
      `isTraceEnabled` in interface `Log`
    Returns:
      true if trace is enabled in the underlying logger.
    See Also:
      - `Log.isTraceEnabled()`

  - ### isWarnEnabled

    public boolean isWarnEnabled()
    Deprecated.
    Is logging to `org.apache.avalon.framework.logger.Logger.warn` enabled?
    Specified by:
      `isWarnEnabled` in interface `Log`
    Returns:
      true if warn is enabled in the underlying logger.
    See Also:
      - `Log.isWarnEnabled()`

  - ### trace

    public void trace(Object message)
    Deprecated.
    Logs a message with `org.apache.avalon.framework.logger.Logger.debug`.
    Specified by:
      `trace` in interface `Log`
    Parameters:
      `message` - to log
    See Also:
      - `Log.trace(Object)`

  - ### trace

    public void trace(Object message, Throwable t)
    Deprecated.
    Logs a message with `org.apache.avalon.framework.logger.Logger.debug`.
    Specified by:
      `trace` in interface `Log`
    Parameters:
      `message` - to log.
      `t` - log this cause.
    See Also:
      - `Log.trace(Object, Throwable)`

  - ### warn

    public void warn(Object message)
    Deprecated.
    Logs a message with `org.apache.avalon.framework.logger.Logger.warn`.
    Specified by:
      `warn` in interface `Log`
    Parameters:
      `message` - to log
    See Also:
      - `Log.warn(Object)`

  - ### warn

    public void warn(Object message, Throwable t)
    Deprecated.
    Logs a message with `org.apache.avalon.framework.logger.Logger.warn`.
    Specified by:
      `warn` in interface `Log`
    Parameters:
      `message` - to log
      `t` - log this cause
    See Also:
      - `Log.warn(Object, Throwable)`