Jdk14Logger (Apache Commons Logging 1.4.0 API)
Description: declaration: package: org.apache.commons.logging.impl, class: Jdk14Logger

Package org.apache.commons.logging.impl

# Class Jdk14Logger

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

All Implemented Interfaces:
  `Serializable`, `Log`

public class Jdk14Logger extends Object implements Log, Serializable
Implements the `org.apache.commons.logging.Log` interface to wrap the standard JDK logging mechanisms that were introduced in the Merlin release (JDK 1.4).

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected static final Level`
  `dummyLevel`
  This member variable simply ensures that any attempt to initialize this class in a pre-1.4 JVM will result in an ExceptionInInitializerError.
  `protected Logger`
  `logger`
  The underlying Logger implementation we are using.
  `protected String`
  `name`
  The name of the logger we are wrapping.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Jdk14Logger(String name)`
  Constructs a named instance of this Logger.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `debug(Object message)`
  Logs a message with `Level.FINE`.
  `void`
  `debug(Object message, Throwable exception)`
  Logs a message with `Level.FINE`.
  `void`
  `error(Object message)`
  Logs a message with `Level.SEVERE`.
  `void`
  `error(Object message, Throwable exception)`
  Logs a message with `Level.SEVERE`.
  `void`
  `fatal(Object message)`
  Logs a message with `Level.SEVERE`.
  `void`
  `fatal(Object message, Throwable exception)`
  Logs a message with `Level.SEVERE`.
  `Logger`
  `getLogger()`
  Gets the native Logger instance we are using.
  `void`
  `info(Object message)`
  Logs a message with `Level.INFO`.
  `void`
  `info(Object message, Throwable exception)`
  Logs a message with `Level.INFO`.
  `boolean`
  `isDebugEnabled()`
  Is debug logging currently enabled?
  `boolean`
  `isErrorEnabled()`
  Is error logging currently enabled?
  `boolean`
  `isFatalEnabled()`
  Is fatal logging currently enabled?
  `boolean`
  `isInfoEnabled()`
  Is info logging currently enabled?
  `boolean`
  `isTraceEnabled()`
  Is trace logging currently enabled?
  `boolean`
  `isWarnEnabled()`
  Is warn logging currently enabled?
  `protected void`
  `log(Level level, String msg, Throwable ex)`
  Logs a message at the given level.
  `void`
  `trace(Object message)`
  Logs a message with `Level.FINEST`.
  `void`
  `trace(Object message, Throwable exception)`
  Logs a message with `Level.FINEST`.
  `void`
  `warn(Object message)`
  Logs a message with `Level.WARNING`.
  `void`
  `warn(Object message, Throwable exception)`
  Logs a message with `Level.WARNING`.

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

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

- ## Field Details

  - ### dummyLevel

    protected static final Level dummyLevel
    This member variable simply ensures that any attempt to initialize this class in a pre-1.4 JVM will result in an ExceptionInInitializerError. It must not be private, as an optimizing compiler could detect that it is not used and optimize it away.

  - ### logger

    protected transient Logger logger
    The underlying Logger implementation we are using.

  - ### name

    protected String name
    The name of the logger we are wrapping.

- ## Constructor Details

  - ### Jdk14Logger

    public Jdk14Logger(String name)
    Constructs a named instance of this Logger.
    Parameters:
      `name` - Name of the logger to be constructed

- ## Method Details

  - ### debug

    public void debug(Object message)
    Logs a message with `Level.FINE`.
    Specified by:
      `debug` in interface `Log`
    Parameters:
      `message` - to log
    See Also:
      - `Log.debug(Object)`

  - ### debug

    public void debug(Object message, Throwable exception)
    Logs a message with `Level.FINE`.
    Specified by:
      `debug` in interface `Log`
    Parameters:
      `message` - to log
      `exception` - log this cause
    See Also:
      - `Log.debug(Object, Throwable)`

  - ### error

    public void error(Object message)
    Logs a message with `Level.SEVERE`.
    Specified by:
      `error` in interface `Log`
    Parameters:
      `message` - to log
    See Also:
      - `Log.error(Object)`

  - ### error

    public void error(Object message, Throwable exception)
    Logs a message with `Level.SEVERE`.
    Specified by:
      `error` in interface `Log`
    Parameters:
      `message` - to log
      `exception` - log this cause
    See Also:
      - `Log.error(Object, Throwable)`

  - ### fatal

    public void fatal(Object message)
    Logs a message with `Level.SEVERE`.
    Specified by:
      `fatal` in interface `Log`
    Parameters:
      `message` - to log
    See Also:
      - `Log.fatal(Object)`

  - ### fatal

    public void fatal(Object message, Throwable exception)
    Logs a message with `Level.SEVERE`.
    Specified by:
      `fatal` in interface `Log`
    Parameters:
      `message` - to log
      `exception` - log this cause
    See Also:
      - `Log.fatal(Object, Throwable)`

  - ### getLogger

    public Logger getLogger()
    Gets the native Logger instance we are using.
    Returns:
      the native Logger instance we are using.

  - ### info

    public void info(Object message)
    Logs a message with `Level.INFO`.
    Specified by:
      `info` in interface `Log`
    Parameters:
      `message` - to log
    See Also:
      - `Log.info(Object)`

  - ### info

    public void info(Object message, Throwable exception)
    Logs a message with `Level.INFO`.
    Specified by:
      `info` in interface `Log`
    Parameters:
      `message` - to log
      `exception` - log this cause
    See Also:
      - `Log.info(Object, Throwable)`

  - ### isDebugEnabled

    public boolean isDebugEnabled()
    Is debug logging currently enabled?
    Specified by:
      `isDebugEnabled` in interface `Log`
    Returns:
      true if debug is enabled in the underlying logger.

  - ### isErrorEnabled

    public boolean isErrorEnabled()
    Is error logging currently enabled?
    Specified by:
      `isErrorEnabled` in interface `Log`
    Returns:
      true if error is enabled in the underlying logger.

  - ### isFatalEnabled

    public boolean isFatalEnabled()
    Is fatal logging currently enabled?
    Specified by:
      `isFatalEnabled` in interface `Log`
    Returns:
      true if fatal is enabled in the underlying logger.

  - ### isInfoEnabled

    public boolean isInfoEnabled()
    Is info logging currently enabled?
    Specified by:
      `isInfoEnabled` in interface `Log`
    Returns:
      true if info is enabled in the underlying logger.

  - ### isTraceEnabled

    public boolean isTraceEnabled()
    Is trace logging currently enabled?
    Specified by:
      `isTraceEnabled` in interface `Log`
    Returns:
      true if trace is enabled in the underlying logger.

  - ### isWarnEnabled

    public boolean isWarnEnabled()
    Is warn logging currently enabled?
    Specified by:
      `isWarnEnabled` in interface `Log`
    Returns:
      true if warn is enabled in the underlying logger.

  - ### log

    protected void log(Level level, String msg, Throwable ex)
    Logs a message at the given level.
    Parameters:
      `level` - The level.
      `msg` - The message.
      `ex` - The exception.

  - ### trace

    public void trace(Object message)
    Logs a message with `Level.FINEST`.
    Specified by:
      `trace` in interface `Log`
    Parameters:
      `message` - to log
    See Also:
      - `Log.trace(Object)`

  - ### trace

    public void trace(Object message, Throwable exception)
    Logs a message with `Level.FINEST`.
    Specified by:
      `trace` in interface `Log`
    Parameters:
      `message` - to log
      `exception` - log this cause
    See Also:
      - `Log.trace(Object, Throwable)`

  - ### warn

    public void warn(Object message)
    Logs a message with `Level.WARNING`.
    Specified by:
      `warn` in interface `Log`
    Parameters:
      `message` - to log
    See Also:
      - `Log.warn(Object)`

  - ### warn

    public void warn(Object message, Throwable exception)
    Logs a message with `Level.WARNING`.
    Specified by:
      `warn` in interface `Log`
    Parameters:
      `message` - to log
      `exception` - log this cause
    See Also:
      - `Log.warn(Object, Throwable)`