LogKitLogger
Date: 2015-09-14

org.apache.commons.logging.impl

## Class LogKitLogger

- java.lang.Object
- - org.apache.commons.logging.impl.LogKitLogger

- All Implemented Interfaces:
    java.io.Serializable, Log

      public class LogKitLogger
      extends java.lang.Object
      implements Log, java.io.Serializable

  Implementation of `org.apache.commons.logging.Log` that wraps the avalon-logkit logging system. Configuration of `LogKit` is left to the user.

  `LogKit` accepts only `String` messages. Therefore, this implementation converts object messages into strings by called their `toString()` method before logging them.

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Logger` | `logger` Logging goes to this `LogKit` logger
    `protected java.lang.String` | `name` Name of this logger

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LogKitLogger(java.lang.String name)` Construct `LogKitLogger` which wraps the `LogKit` logger with given name.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `debug(java.lang.Object message)` Logs a message with `org.apache.log.Priority.DEBUG`.
    `void` | `debug(java.lang.Object message, java.lang.Throwable t)` Logs a message with `org.apache.log.Priority.DEBUG`.
    `void` | `error(java.lang.Object message)` Logs a message with `org.apache.log.Priority.ERROR`.
    `void` | `error(java.lang.Object message, java.lang.Throwable t)` Logs a message with `org.apache.log.Priority.ERROR`.
    `void` | `fatal(java.lang.Object message)` Logs a message with `org.apache.log.Priority.FATAL_ERROR`.
    `void` | `fatal(java.lang.Object message, java.lang.Throwable t)` Logs a message with `org.apache.log.Priority.FATAL_ERROR`.
    `Logger` | `getLogger()` Return the underlying Logger we are using.
    `void` | `info(java.lang.Object message)` Logs a message with `org.apache.log.Priority.INFO`.
    `void` | `info(java.lang.Object message, java.lang.Throwable t)` Logs a message with `org.apache.log.Priority.INFO`.
    `boolean` | `isDebugEnabled()` Checks whether the `LogKit` logger will log messages of priority `DEBUG`.
    `boolean` | `isErrorEnabled()` Checks whether the `LogKit` logger will log messages of priority `ERROR`.
    `boolean` | `isFatalEnabled()` Checks whether the `LogKit` logger will log messages of priority `FATAL_ERROR`.
    `boolean` | `isInfoEnabled()` Checks whether the `LogKit` logger will log messages of priority `INFO`.
    `boolean` | `isTraceEnabled()` Checks whether the `LogKit` logger will log messages of priority `DEBUG`.
    `boolean` | `isWarnEnabled()` Checks whether the `LogKit` logger will log messages of priority `WARN`.
    `void` | `trace(java.lang.Object message)` Logs a message with `org.apache.log.Priority.DEBUG`.
    `void` | `trace(java.lang.Object message, java.lang.Throwable t)` Logs a message with `org.apache.log.Priority.DEBUG`.
    `void` | `warn(java.lang.Object message)` Logs a message with `org.apache.log.Priority.WARN`.
    `void` | `warn(java.lang.Object message, java.lang.Throwable t)` Logs a message with `org.apache.log.Priority.WARN`.

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

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

- - ### Field Detail

    - #### logger

          protected transient volatile Logger logger

      Logging goes to this `LogKit` logger

    - #### name

          protected java.lang.String name

      Name of this logger

  - ### Constructor Detail

    - #### LogKitLogger

          public LogKitLogger(java.lang.String name)

      Construct `LogKitLogger` which wraps the `LogKit` logger with given name.
      Parameters:
        `name` - log name

  - ### Method Detail

    - #### getLogger

          public Logger getLogger()

      Return the underlying Logger we are using.

    - #### trace

          public void trace(java.lang.Object message)

      Logs a message with `org.apache.log.Priority.DEBUG`.
      Specified by:
        `trace` in interface `Log`
      Parameters:
        `message` - to log
      See Also:
        `Log.trace(Object)`

    - #### trace

          public void trace(java.lang.Object message,
                   java.lang.Throwable t)

      Logs a message with `org.apache.log.Priority.DEBUG`.
      Specified by:
        `trace` in interface `Log`
      Parameters:
        `message` - to log
        `t` - log this cause
      See Also:
        `Log.trace(Object, Throwable)`

    - #### debug

          public void debug(java.lang.Object message)

      Logs a message with `org.apache.log.Priority.DEBUG`.
      Specified by:
        `debug` in interface `Log`
      Parameters:
        `message` - to log
      See Also:
        `Log.debug(Object)`

    - #### debug

          public void debug(java.lang.Object message,
                   java.lang.Throwable t)

      Logs a message with `org.apache.log.Priority.DEBUG`.
      Specified by:
        `debug` in interface `Log`
      Parameters:
        `message` - to log
        `t` - log this cause
      See Also:
        `Log.debug(Object, Throwable)`

    - #### info

          public void info(java.lang.Object message)

      Logs a message with `org.apache.log.Priority.INFO`.
      Specified by:
        `info` in interface `Log`
      Parameters:
        `message` - to log
      See Also:
        `Log.info(Object)`

    - #### info

          public void info(java.lang.Object message,
                  java.lang.Throwable t)

      Logs a message with `org.apache.log.Priority.INFO`.
      Specified by:
        `info` in interface `Log`
      Parameters:
        `message` - to log
        `t` - log this cause
      See Also:
        `Log.info(Object, Throwable)`

    - #### warn

          public void warn(java.lang.Object message)

      Logs a message with `org.apache.log.Priority.WARN`.
      Specified by:
        `warn` in interface `Log`
      Parameters:
        `message` - to log
      See Also:
        `Log.warn(Object)`

    - #### warn

          public void warn(java.lang.Object message,
                  java.lang.Throwable t)

      Logs a message with `org.apache.log.Priority.WARN`.
      Specified by:
        `warn` in interface `Log`
      Parameters:
        `message` - to log
        `t` - log this cause
      See Also:
        `Log.warn(Object, Throwable)`

    - #### error

          public void error(java.lang.Object message)

      Logs a message with `org.apache.log.Priority.ERROR`.
      Specified by:
        `error` in interface `Log`
      Parameters:
        `message` - to log
      See Also:
        `Log.error(Object)`

    - #### error

          public void error(java.lang.Object message,
                   java.lang.Throwable t)

      Logs a message with `org.apache.log.Priority.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(java.lang.Object message)

      Logs a message with `org.apache.log.Priority.FATAL_ERROR`.
      Specified by:
        `fatal` in interface `Log`
      Parameters:
        `message` - to log
      See Also:
        `Log.fatal(Object)`

    - #### fatal

          public void fatal(java.lang.Object message,
                   java.lang.Throwable t)

      Logs a message with `org.apache.log.Priority.FATAL_ERROR`.
      Specified by:
        `fatal` in interface `Log`
      Parameters:
        `message` - to log
        `t` - log this cause
      See Also:
        `Log.fatal(Object, Throwable)`

    - #### isDebugEnabled

          public boolean isDebugEnabled()

      Checks whether the `LogKit` logger will log messages of priority `DEBUG`.
      Specified by:
        `isDebugEnabled` in interface `Log`
      Returns:
        true if debug is enabled in the underlying logger.

    - #### isErrorEnabled

          public boolean isErrorEnabled()

      Checks whether the `LogKit` logger will log messages of priority `ERROR`.
      Specified by:
        `isErrorEnabled` in interface `Log`
      Returns:
        true if error is enabled in the underlying logger.

    - #### isFatalEnabled

          public boolean isFatalEnabled()

      Checks whether the `LogKit` logger will log messages of priority `FATAL_ERROR`.
      Specified by:
        `isFatalEnabled` in interface `Log`
      Returns:
        true if fatal is enabled in the underlying logger.

    - #### isInfoEnabled

          public boolean isInfoEnabled()

      Checks whether the `LogKit` logger will log messages of priority `INFO`.
      Specified by:
        `isInfoEnabled` in interface `Log`
      Returns:
        true if info is enabled in the underlying logger.

    - #### isTraceEnabled

          public boolean isTraceEnabled()

      Checks whether the `LogKit` logger will log messages of priority `DEBUG`.
      Specified by:
        `isTraceEnabled` in interface `Log`
      Returns:
        true if trace is enabled in the underlying logger.

    - #### isWarnEnabled

          public boolean isWarnEnabled()

      Checks whether the `LogKit` logger will log messages of priority `WARN`.
      Specified by:
        `isWarnEnabled` in interface `Log`
      Returns:
        true if warn is enabled in the underlying logger.