Package org.apache.log4j.spi

## Class NOPULogger

- java.lang.Object
- - org.apache.log4j.spi.NOPULogger

- All Implemented Interfaces:
    `ULogger`

      public final class NOPULogger
      extends Object
      implements ULogger

  A no operation (NOP) implementation of `ULogger`.
  Author:
    Ceki Gülcü

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static NOPULogger` | `NOP_LOGGER` | The unique instance of NOPLogger.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `debug​(Object msg)` | Log a message object with the DEBUG level.
    `void` | `debug​(Object parameterizedMsg, Object param1)` | Log a parameterized message object at the DEBUG level.
    `void` | `debug​(Object msg, Throwable t)` | Log a message object with the `DEBUG` level including the stack trace of the `Throwable` `t` passed as parameter.
    `void` | `debug​(String parameterizedMsg, Object param1, Object param2)` | Log a parameterized message object at the DEBUG level.
    `void` | `error​(Object msg)` | Log a message object with the ERROR level.
    `void` | `error​(Object parameterizedMsg, Object param1)` | Log a parameterized message object at the ERROR level.
    `void` | `error​(Object msg, Throwable t)` | Log a message object with the `ERROR` level including the stack trace of the `Throwable` `t` passed as parameter.
    `void` | `error​(String parameterizedMsg, Object param1, Object param2)` | Log a parameterized message object at the ERROR level.
    `static NOPULogger` | `getLogger​(String name)` | Get instance.
    `void` | `info​(Object msg)` | Log a message object with the INFO level.
    `void` | `info​(Object parameterizedMsg, Object param1)` | Log a parameterized message object at the INFO level.
    `void` | `info​(Object msg, Throwable t)` | Log a message object with the `INFO` level including the stack trace of the `Throwable` `t` passed as parameter.
    `void` | `info​(String parameterizedMsg, Object param1, Object param2)` | Log a parameterized message object at the INFO level.
    `boolean` | `isDebugEnabled()` | Is the logger instance enabled for the DEBUG level?
    `boolean` | `isErrorEnabled()` | Is the logger instance enabled for the ERROR level?
    `boolean` | `isInfoEnabled()` | Is the logger instance enabled for the INFO level?
    `boolean` | `isWarnEnabled()` | Is the logger instance enabled for the WARN level?
    `void` | `warn​(Object msg)` | Log a message object with the WARN level.
    `void` | `warn​(Object parameterizedMsg, Object param1)` | Log a parameterized message object at the WARN level.
    `void` | `warn​(Object msg, Throwable t)` | Log a message object with the `WARN` level including the stack trace of the `Throwable` `t` passed as parameter.
    `void` | `warn​(String parameterizedMsg, Object param1, Object param2)` | Log a parameterized message object at the WARN level.

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

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

- - ### Field Detail

    - #### NOP_LOGGER

          public static final NOPULogger NOP_LOGGER

      The unique instance of NOPLogger.

  - ### Method Detail

    - #### getLogger

          public static NOPULogger getLogger​(String name)

      Get instance.
      Parameters:
        `name` - logger name.
      Returns:
        logger.

    - #### isDebugEnabled

          public boolean isDebugEnabled()

      Is the logger instance enabled for the DEBUG level?
      Specified by:
        `isDebugEnabled` in interface `ULogger`
      Returns:
        true if debug is enabled.

    - #### debug

          public void debug​(Object msg)

      Log a message object with the DEBUG level.
      Specified by:
        `debug` in interface `ULogger`
      Parameters:
        `msg` - - the message object to be logged

    - #### debug

          public void debug​(Object parameterizedMsg,
                            Object param1)

      Log a parameterized message object at the DEBUG level.

      This form is useful in avoiding the superflous object creation problem when invoking this method while it is disabled.

      Specified by:
        `debug` in interface `ULogger`
      Parameters:
        `parameterizedMsg` - - the parameterized message object
        `param1` - - the parameter

    - #### debug

          public void debug​(String parameterizedMsg,
                            Object param1,
                            Object param2)

      Log a parameterized message object at the DEBUG level.

      This form is useful in avoiding the superflous object creation problem when invoking this method while it is disabled.

      Specified by:
        `debug` in interface `ULogger`
      Parameters:
        `parameterizedMsg` - - the parameterized message object
        `param1` - - the first parameter
        `param2` - - the second parameter

    - #### debug

          public void debug​(Object msg,
                            Throwable t)

      Log a message object with the `DEBUG` level including the stack trace of the `Throwable` `t` passed as parameter.
      Specified by:
        `debug` in interface `ULogger`
      Parameters:
        `msg` - the message object to log.
        `t` - the exception to log, including its stack trace.

    - #### isInfoEnabled

          public boolean isInfoEnabled()

      Is the logger instance enabled for the INFO level?
      Specified by:
        `isInfoEnabled` in interface `ULogger`
      Returns:
        true if debug is enabled.

    - #### info

          public void info​(Object msg)

      Log a message object with the INFO level.
      Specified by:
        `info` in interface `ULogger`
      Parameters:
        `msg` - - the message object to be logged

    - #### info

          public void info​(Object parameterizedMsg,
                           Object param1)

      Log a parameterized message object at the INFO level.

      This form is useful in avoiding the superflous object creation problem when invoking this method while it is disabled.

      Specified by:
        `info` in interface `ULogger`
      Parameters:
        `parameterizedMsg` - - the parameterized message object
        `param1` - - the parameter

    - #### info

          public void info​(String parameterizedMsg,
                           Object param1,
                           Object param2)

      Log a parameterized message object at the INFO level.

      This form is useful in avoiding the superflous object creation problem when invoking this method while it is disabled.

      Specified by:
        `info` in interface `ULogger`
      Parameters:
        `parameterizedMsg` - - the parameterized message object
        `param1` - - the first parameter
        `param2` - - the second parameter

    - #### info

          public void info​(Object msg,
                           Throwable t)

      Log a message object with the `INFO` level including the stack trace of the `Throwable` `t` passed as parameter.
      Specified by:
        `info` in interface `ULogger`
      Parameters:
        `msg` - the message object to log.
        `t` - the exception to log, including its stack trace.

    - #### isWarnEnabled

          public boolean isWarnEnabled()

      Is the logger instance enabled for the WARN level?
      Specified by:
        `isWarnEnabled` in interface `ULogger`
      Returns:
        true if debug is enabled.

    - #### warn

          public void warn​(Object msg)

      Log a message object with the WARN level.
      Specified by:
        `warn` in interface `ULogger`
      Parameters:
        `msg` - - the message object to be logged

    - #### warn

          public void warn​(Object parameterizedMsg,
                           Object param1)

      Log a parameterized message object at the WARN level.

      This form is useful in avoiding the superflous object creation problem when invoking this method while it is disabled.

      Specified by:
        `warn` in interface `ULogger`
      Parameters:
        `parameterizedMsg` - - the parameterized message object
        `param1` - - the parameter

    - #### warn

          public void warn​(String parameterizedMsg,
                           Object param1,
                           Object param2)

      Log a parameterized message object at the WARN level.

      This form is useful in avoiding the superflous object creation problem when invoking this method while it is disabled.

      Specified by:
        `warn` in interface `ULogger`
      Parameters:
        `parameterizedMsg` - - the parameterized message object
        `param1` - - the first parameter
        `param2` - - the second parameter

    - #### warn

          public void warn​(Object msg,
                           Throwable t)

      Log a message object with the `WARN` level including the stack trace of the `Throwable` `t` passed as parameter.
      Specified by:
        `warn` in interface `ULogger`
      Parameters:
        `msg` - the message object to log.
        `t` - the exception to log, including its stack trace.

    - #### isErrorEnabled

          public boolean isErrorEnabled()

      Is the logger instance enabled for the ERROR level?
      Specified by:
        `isErrorEnabled` in interface `ULogger`
      Returns:
        true if debug is enabled.

    - #### error

          public void error​(Object msg)

      Log a message object with the ERROR level.
      Specified by:
        `error` in interface `ULogger`
      Parameters:
        `msg` - - the message object to be logged

    - #### error

          public void error​(Object parameterizedMsg,
                            Object param1)

      Log a parameterized message object at the ERROR level.

      This form is useful in avoiding the superflous object creation problem when invoking this method while it is disabled.

      Specified by:
        `error` in interface `ULogger`
      Parameters:
        `parameterizedMsg` - - the parameterized message object
        `param1` - - the parameter

    - #### error

          public void error​(String parameterizedMsg,
                            Object param1,
                            Object param2)

      Log a parameterized message object at the ERROR level.

      This form is useful in avoiding the superflous object creation problem when invoking this method while it is disabled.

      Specified by:
        `error` in interface `ULogger`
      Parameters:
        `parameterizedMsg` - - the parameterized message object
        `param1` - - the first parameter
        `param2` - - the second parameter

    - #### error

          public void error​(Object msg,
                            Throwable t)

      Log a message object with the `ERROR` level including the stack trace of the `Throwable` `t` passed as parameter.
      Specified by:
        `error` in interface `ULogger`
      Parameters:
        `msg` - the message object to log.
        `t` - the exception to log, including its stack trace.