Package fr.gouv.vitam.common.logging

# Class AbstractVitamLogger

java.lang.Object
fr.gouv.vitam.common.logging.AbstractVitamLogger

All Implemented Interfaces:
  `VitamLogger`, `Serializable`

public abstract class AbstractVitamLogger extends Object implements VitamLogger, Serializable
This class implements all methods that have a `VitamLogLevel` parameter by default to call specific logger methods such as `VitamLogger.info(String)` or `VitamLogger.isInfoEnabled()`.
Inspired from Netty A skeletal implementation of `VitamLogger`

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `AbstractVitamLogger(String name)`
  Creates a new instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `debug(Throwable t)`
  Log an exception (throwable) at the DEBUG level.
  `void`
  `error(Throwable t)`
  Log an exception (throwable) at the ERROR level.
  `void`
  `info(Throwable t)`
  Log an exception (throwable) at the INFO level.
  `boolean`
  `isEnabled(VitamLogLevel level)`
  Is the logger instance enabled for the specified `level`?
  `void`
  `log(VitamLogLevel level, String msg)`
  Log a message at the specified `level`.
  `void`
  `log(VitamLogLevel level, String format, Object arg)`
  Log a message at the specified `level` according to the specified format and argument.
  `void`
  `log(VitamLogLevel level, String format, Object... arguments)`
  Log a message at the specified `level` according to the specified format and arguments.
  `void`
  `log(VitamLogLevel level, String format, Object argA, Object argB)`
  Log a message at the specified `level` according to the specified format and arguments.
  `void`
  `log(VitamLogLevel level, String msg, Throwable cause)`
  Log an exception (throwable) at the specified `level` with an accompanying message.
  `void`
  `log(VitamLogLevel level, Throwable cause)`
  Log an exception (throwable) at the specified `level`.
  `String`
  `name()`
  Return the name of this `VitamLogger` instance.
  `protected Object`
  `readResolve()`
  `static final String`
  `simpleClassName(Class<?> clazz)`
  `static final String`
  `simpleClassName(Object o)`
  `String`
  `toString()`
  `void`
  `trace(Throwable t)`
  Log an exception (throwable) at the TRACE level.
  `void`
  `warn(Throwable t)`
  Log an exception (throwable) at the WARN level.

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

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

  ### Methods inherited from interface fr.gouv.vitam.common.logging.VitamLogger

  `debug, debug, debug, debug, debug, error, error, error, error, error, getLevel, info, info, info, info, info, isDebugEnabled, isErrorEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled, setLevel, timeInfo, timeInfo, trace, trace, trace, trace, trace, warn, warn, warn, warn, warn`

- ## Constructor Details

  - ### AbstractVitamLogger

    protected AbstractVitamLogger(String name)
    Creates a new instance.

- ## Method Details

  - ### name

    public String name()
    Description copied from interface: `VitamLogger`
    Return the name of this `VitamLogger` instance.
    Specified by:
      `name` in interface `VitamLogger`
    Returns:
      name of this logger instance

  - ### isEnabled

    public boolean isEnabled(VitamLogLevel level)
    Description copied from interface: `VitamLogger`
    Is the logger instance enabled for the specified `level`?
    Specified by:
      `isEnabled` in interface `VitamLogger`
    Parameters:
      `level` -
    Returns:
      True if this Logger is enabled for the specified `level`, false otherwise.

  - ### trace

    public void trace(Throwable t)
    Description copied from interface: `VitamLogger`
    Log an exception (throwable) at the TRACE level.
    Specified by:
      `trace` in interface `VitamLogger`
    Parameters:
      `t` - the exception (throwable) to log

  - ### debug

    public void debug(Throwable t)
    Description copied from interface: `VitamLogger`
    Log an exception (throwable) at the DEBUG level.
    Specified by:
      `debug` in interface `VitamLogger`
    Parameters:
      `t` - the exception (throwable) to log

  - ### info

    public void info(Throwable t)
    Description copied from interface: `VitamLogger`
    Log an exception (throwable) at the INFO level.
    Specified by:
      `info` in interface `VitamLogger`
    Parameters:
      `t` - the exception (throwable) to log

  - ### warn

    public void warn(Throwable t)
    Description copied from interface: `VitamLogger`
    Log an exception (throwable) at the WARN level.
    Specified by:
      `warn` in interface `VitamLogger`
    Parameters:
      `t` - the exception (throwable) to log

  - ### error

    public void error(Throwable t)
    Description copied from interface: `VitamLogger`
    Log an exception (throwable) at the ERROR level.
    Specified by:
      `error` in interface `VitamLogger`
    Parameters:
      `t` - the exception (throwable) to log

  - ### log

    public void log(VitamLogLevel level, String msg, Throwable cause)
    Description copied from interface: `VitamLogger`
    Log an exception (throwable) at the specified `level` with an accompanying message.
    Specified by:
      `log` in interface `VitamLogger`
    Parameters:
      `level` -
      `msg` - the message accompanying the exception
      `cause` - the exception (throwable) to log

  - ### log

    public void log(VitamLogLevel level, Throwable cause)
    Description copied from interface: `VitamLogger`
    Log an exception (throwable) at the specified `level`.
    Specified by:
      `log` in interface `VitamLogger`
    Parameters:
      `level` -
      `cause` - the exception (throwable) to log

  - ### log

    public void log(VitamLogLevel level, String msg)
    Description copied from interface: `VitamLogger`
    Log a message at the specified `level`.
    Specified by:
      `log` in interface `VitamLogger`
    Parameters:
      `level` -
      `msg` - the message string to be logged

  - ### log

    public void log(VitamLogLevel level, String format, Object arg)
    Description copied from interface: `VitamLogger`
    Log a message at the specified `level` according to the specified format and argument.

    This form avoids superfluous object creation when the logger is disabled for the specified `level`.

    Specified by:
      `log` in interface `VitamLogger`
    Parameters:
      `level` -
      `format` - the format string
      `arg` - the argument

  - ### log

    public void log(VitamLogLevel level, String format, Object argA, Object argB)
    Description copied from interface: `VitamLogger`
    Log a message at the specified `level` according to the specified format and arguments.

    This form avoids superfluous object creation when the logger is disabled for the specified `level`.

    Specified by:
      `log` in interface `VitamLogger`
    Parameters:
      `level` -
      `format` - the format string
      `argA` - the first argument
      `argB` - the second argument

  - ### log

    public void log(VitamLogLevel level, String format, Object... arguments)
    Description copied from interface: `VitamLogger`
    Log a message at the specified `level` according to the specified format and arguments.

    This form avoids superfluous string concatenation when the logger is disabled for the specified `level`. However, this variant incurs the hidden (and relatively small) cost of creating an `Object[]` before invoking the method, even if this logger is disabled for the specified `level`. The variants taking `one` and `two` arguments exist solely in order to avoid this hidden cost.

    Specified by:
      `log` in interface `VitamLogger`
    Parameters:
      `level` -
      `format` - the format string
      `arguments` - a list of 3 or more arguments

  - ### readResolve

    protected Object readResolve() throws ObjectStreamException
    Throws:
      `ObjectStreamException`

  - ### simpleClassName

    public static final String simpleClassName(Object o)
    Parameters:
      `o` - the object to get its class name
    Returns:
      the simple Class Name

  - ### simpleClassName

    public static final String simpleClassName(Class<?> clazz)
    Parameters:
      `clazz` - instance of a class
    Returns:
      the simple Class Name

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`