Module org.slf4j

Class NOPLogger

java.lang.Object
org.slf4j.helpers.NOPLogger
All Implemented Interfaces:
Serializable, Logger

public class NOPLogger extends Object implements Logger
A direct NOP (no operation) implementation of Logger.
Author:
Ceki Gülcü
See Also:
  • Field Details Link icon

  • Constructor Details Link icon

    • NOPLogger Link icon

      protected NOPLogger()
      There is no point in creating multiple instances of NOPLogger. The present constructor should be "private" but we are leaving it as "protected" for compatibility.
  • Method Details Link icon

    • getName Link icon

      public String getName()
      Always returns the string value "NOP".
      Specified by:
      getName in interface Logger
      Returns:
      name of this logger instance
    • isTraceEnabled Link icon

      public final boolean isTraceEnabled()
      Always returns false.
      Specified by:
      isTraceEnabled in interface Logger
      Returns:
      always false
    • trace Link icon

      public final void trace(String msg)
      A NOP implementation.
      Specified by:
      trace in interface Logger
      Parameters:
      msg - the message string to be logged
    • trace Link icon

      public final void trace(String format, Object arg)
      A NOP implementation.
      Specified by:
      trace in interface Logger
      Parameters:
      format - the format string
      arg - the argument
    • trace Link icon

      public final void trace(String format, Object arg1, Object arg2)
      A NOP implementation.
      Specified by:
      trace in interface Logger
      Parameters:
      format - the format string
      arg1 - the first argument
      arg2 - the second argument
    • trace Link icon

      public final void trace(String format, Object... argArray)
      A NOP implementation.
      Specified by:
      trace in interface Logger
      Parameters:
      format - the format string
      argArray - a list of 3 or more arguments
    • trace Link icon

      public final void trace(String msg, Throwable t)
      A NOP implementation.
      Specified by:
      trace in interface Logger
      Parameters:
      msg - the message accompanying the exception
      t - the exception (throwable) to log
    • isDebugEnabled Link icon

      public final boolean isDebugEnabled()
      Always returns false.
      Specified by:
      isDebugEnabled in interface Logger
      Returns:
      always false
    • debug Link icon

      public final void debug(String msg)
      A NOP implementation.
      Specified by:
      debug in interface Logger
      Parameters:
      msg - the message string to be logged
    • debug Link icon

      public final void debug(String format, Object arg)
      A NOP implementation.
      Specified by:
      debug in interface Logger
      Parameters:
      format - the format string
      arg - the argument
    • debug Link icon

      public final void debug(String format, Object arg1, Object arg2)
      A NOP implementation.
      Specified by:
      debug in interface Logger
      Parameters:
      format - the format string
      arg1 - the first argument
      arg2 - the second argument
    • debug Link icon

      public final void debug(String format, Object... argArray)
      A NOP implementation.
      Specified by:
      debug in interface Logger
      Parameters:
      format - the format string
      argArray - a list of 3 or more arguments
    • debug Link icon

      public final void debug(String msg, Throwable t)
      A NOP implementation.
      Specified by:
      debug in interface Logger
      Parameters:
      msg - the message accompanying the exception
      t - the exception (throwable) to log
    • isInfoEnabled Link icon

      public final boolean isInfoEnabled()
      Always returns false.
      Specified by:
      isInfoEnabled in interface Logger
      Returns:
      always false
    • info Link icon

      public final void info(String msg)
      A NOP implementation.
      Specified by:
      info in interface Logger
      Parameters:
      msg - the message string to be logged
    • info Link icon

      public final void info(String format, Object arg1)
      A NOP implementation.
      Specified by:
      info in interface Logger
      Parameters:
      format - the format string
      arg1 - the argument
    • info Link icon

      public final void info(String format, Object arg1, Object arg2)
      A NOP implementation.
      Specified by:
      info in interface Logger
      Parameters:
      format - the format string
      arg1 - the first argument
      arg2 - the second argument
    • info Link icon

      public final void info(String format, Object... argArray)
      A NOP implementation.
      Specified by:
      info in interface Logger
      Parameters:
      format - the format string
      argArray - a list of 3 or more arguments
    • info Link icon

      public final void info(String msg, Throwable t)
      A NOP implementation.
      Specified by:
      info in interface Logger
      Parameters:
      msg - the message accompanying the exception
      t - the exception (throwable) to log
    • isWarnEnabled Link icon

      public final boolean isWarnEnabled()
      Always returns false.
      Specified by:
      isWarnEnabled in interface Logger
      Returns:
      always false
    • warn Link icon

      public final void warn(String msg)
      A NOP implementation.
      Specified by:
      warn in interface Logger
      Parameters:
      msg - the message string to be logged
    • warn Link icon

      public final void warn(String format, Object arg1)
      A NOP implementation.
      Specified by:
      warn in interface Logger
      Parameters:
      format - the format string
      arg1 - the argument
    • warn Link icon

      public final void warn(String format, Object arg1, Object arg2)
      A NOP implementation.
      Specified by:
      warn in interface Logger
      Parameters:
      format - the format string
      arg1 - the first argument
      arg2 - the second argument
    • warn Link icon

      public final void warn(String format, Object... argArray)
      A NOP implementation.
      Specified by:
      warn in interface Logger
      Parameters:
      format - the format string
      argArray - a list of 3 or more arguments
    • warn Link icon

      public final void warn(String msg, Throwable t)
      A NOP implementation.
      Specified by:
      warn in interface Logger
      Parameters:
      msg - the message accompanying the exception
      t - the exception (throwable) to log
    • isErrorEnabled Link icon

      public final boolean isErrorEnabled()
      A NOP implementation.
      Specified by:
      isErrorEnabled in interface Logger
      Returns:
      True if this Logger is enabled for the ERROR level, false otherwise.
    • error Link icon

      public final void error(String msg)
      A NOP implementation.
      Specified by:
      error in interface Logger
      Parameters:
      msg - the message string to be logged
    • error Link icon

      public final void error(String format, Object arg1)
      A NOP implementation.
      Specified by:
      error in interface Logger
      Parameters:
      format - the format string
      arg1 - the argument
    • error Link icon

      public final void error(String format, Object arg1, Object arg2)
      A NOP implementation.
      Specified by:
      error in interface Logger
      Parameters:
      format - the format string
      arg1 - the first argument
      arg2 - the second argument
    • error Link icon

      public final void error(String format, Object... argArray)
      A NOP implementation.
      Specified by:
      error in interface Logger
      Parameters:
      format - the format string
      argArray - a list of 3 or more arguments
    • error Link icon

      public final void error(String msg, Throwable t)
      A NOP implementation.
      Specified by:
      error in interface Logger
      Parameters:
      msg - the message accompanying the exception
      t - the exception (throwable) to log
    • isTraceEnabled Link icon

      public final boolean isTraceEnabled(Marker marker)
      Always returns false.
      Specified by:
      isTraceEnabled in interface Logger
      Parameters:
      marker - The marker data to take into consideration
      Returns:
      always false
    • trace Link icon

      public final void trace(Marker marker, String msg)
      A NOP implementation.
      Specified by:
      trace in interface Logger
      Parameters:
      marker - the marker data specific to this log statement
      msg - the message string to be logged
    • trace Link icon

      public final void trace(Marker marker, String format, Object arg)
      A NOP implementation.
      Specified by:
      trace in interface Logger
      Parameters:
      marker - the marker data specific to this log statement
      format - the format string
      arg - the argument
    • trace Link icon

      public final void trace(Marker marker, String format, Object arg1, Object arg2)
      A NOP implementation.
      Specified by:
      trace in interface Logger
      Parameters:
      marker - the marker data specific to this log statement
      format - the format string
      arg1 - the first argument
      arg2 - the second argument
    • trace Link icon

      public final void trace(Marker marker, String format, Object... argArray)
      A NOP implementation.
      Specified by:
      trace in interface Logger
      Parameters:
      marker - the marker data specific to this log statement
      format - the format string
      argArray - an array of arguments
    • trace Link icon

      public final void trace(Marker marker, String msg, Throwable t)
      A NOP implementation.
      Specified by:
      trace in interface Logger
      Parameters:
      marker - the marker data specific to this log statement
      msg - the message accompanying the exception
      t - the exception (throwable) to log
    • isDebugEnabled Link icon

      public final boolean isDebugEnabled(Marker marker)
      Always returns false.
      Specified by:
      isDebugEnabled in interface Logger
      Parameters:
      marker - The marker data to take into consideration
      Returns:
      always false
    • debug Link icon

      public final void debug(Marker marker, String msg)
      A NOP implementation.
      Specified by:
      debug in interface Logger
      Parameters:
      marker - the marker data specific to this log statement
      msg - the message string to be logged
    • debug Link icon

      public final void debug(Marker marker, String format, Object arg)
      A NOP implementation.
      Specified by:
      debug in interface Logger
      Parameters:
      marker - the marker data specific to this log statement
      format - the format string
      arg - the argument
    • debug Link icon

      public final void debug(Marker marker, String format, Object arg1, Object arg2)
      A NOP implementation.
      Specified by:
      debug in interface Logger
      Parameters:
      marker - the marker data specific to this log statement
      format - the format string
      arg1 - the first argument
      arg2 - the second argument
    • debug Link icon

      public final void debug(Marker marker, String format, Object... arguments)
      Description copied from interface: Logger
      This method is similar to Logger.debug(String, Object...) method except that the marker data is also taken into consideration.
      Specified by:
      debug in interface Logger
      Parameters:
      marker - the marker data specific to this log statement
      format - the format string
      arguments - a list of 3 or more arguments
    • debug Link icon

      public final void debug(Marker marker, String msg, Throwable t)
      Description copied from interface: Logger
      This method is similar to Logger.debug(String, Throwable) method except that the marker data is also taken into consideration.
      Specified by:
      debug in interface Logger
      Parameters:
      marker - the marker data specific to this log statement
      msg - the message accompanying the exception
      t - the exception (throwable) to log
    • isInfoEnabled Link icon

      public boolean isInfoEnabled(Marker marker)
      Always returns false.
      Specified by:
      isInfoEnabled in interface Logger
      Parameters:
      marker - The marker data to take into consideration
      Returns:
      always false
    • info Link icon

      public final void info(Marker marker, String msg)
      A NOP implementation.
      Specified by:
      info in interface Logger
      Parameters:
      marker - The marker specific to this log statement
      msg - the message string to be logged
    • info Link icon

      public final void info(Marker marker, String format, Object arg)
      A NOP implementation.
      Specified by:
      info in interface Logger
      Parameters:
      marker - the marker data specific to this log statement
      format - the format string
      arg - the argument
    • info Link icon

      public final void info(Marker marker, String format, Object arg1, Object arg2)
      A NOP implementation.
      Specified by:
      info in interface Logger
      Parameters:
      marker - the marker data specific to this log statement
      format - the format string
      arg1 - the first argument
      arg2 - the second argument
    • info Link icon

      public final void info(Marker marker, String format, Object... arguments)
      A NOP implementation.
      Specified by:
      info in interface Logger
      Parameters:
      marker - the marker data specific to this log statement
      format - the format string
      arguments - a list of 3 or more arguments
    • info Link icon

      public final void info(Marker marker, String msg, Throwable t)
      A NOP implementation.
      Specified by:
      info in interface Logger
      Parameters:
      marker - the marker data for this log statement
      msg - the message accompanying the exception
      t - the exception (throwable) to log
    • isWarnEnabled Link icon

      public final boolean isWarnEnabled(Marker marker)
      Always returns false.
      Specified by:
      isWarnEnabled in interface Logger
      Parameters:
      marker - The marker data to take into consideration
      Returns:
      always false
    • warn Link icon

      public final void warn(Marker marker, String msg)
      A NOP implementation.
      Specified by:
      warn in interface Logger
      Parameters:
      marker - The marker specific to this log statement
      msg - the message string to be logged
    • warn Link icon

      public final void warn(Marker marker, String format, Object arg)
      A NOP implementation.
      Specified by:
      warn in interface Logger
      Parameters:
      marker - the marker data specific to this log statement
      format - the format string
      arg - the argument
    • warn Link icon

      public final void warn(Marker marker, String format, Object arg1, Object arg2)
      A NOP implementation.
      Specified by:
      warn in interface Logger
      Parameters:
      marker - the marker data specific to this log statement
      format - the format string
      arg1 - the first argument
      arg2 - the second argument
    • warn Link icon

      public final void warn(Marker marker, String format, Object... arguments)
      A NOP implementation.
      Specified by:
      warn in interface Logger
      Parameters:
      marker - the marker data specific to this log statement
      format - the format string
      arguments - a list of 3 or more arguments
    • warn Link icon

      public final void warn(Marker marker, String msg, Throwable t)
      A NOP implementation.
      Specified by:
      warn in interface Logger
      Parameters:
      marker - the marker data for this log statement
      msg - the message accompanying the exception
      t - the exception (throwable) to log
    • isErrorEnabled Link icon

      public final boolean isErrorEnabled(Marker marker)
      Always returns false.
      Specified by:
      isErrorEnabled in interface Logger
      Parameters:
      marker - The marker data to take into consideration
      Returns:
      always false
    • error Link icon

      public final void error(Marker marker, String msg)
      A NOP implementation.
      Specified by:
      error in interface Logger
      Parameters:
      marker - The marker specific to this log statement
      msg - the message string to be logged
    • error Link icon

      public final void error(Marker marker, String format, Object arg)
      A NOP implementation.
      Specified by:
      error in interface Logger
      Parameters:
      marker - the marker data specific to this log statement
      format - the format string
      arg - the argument
    • error Link icon

      public final void error(Marker marker, String format, Object arg1, Object arg2)
      A NOP implementation.
      Specified by:
      error in interface Logger
      Parameters:
      marker - the marker data specific to this log statement
      format - the format string
      arg1 - the first argument
      arg2 - the second argument
    • error Link icon

      public final void error(Marker marker, String format, Object... arguments)
      A NOP implementation.
      Specified by:
      error in interface Logger
      Parameters:
      marker - the marker data specific to this log statement
      format - the format string
      arguments - a list of 3 or more arguments
    • error Link icon

      public final void error(Marker marker, String msg, Throwable t)
      A NOP implementation.
      Specified by:
      error in interface Logger
      Parameters:
      marker - the marker data specific to this log statement
      msg - the message accompanying the exception
      t - the exception (throwable) to log
    • readResolve Link icon

      protected Object readResolve() throws ObjectStreamException
      Replace this instance with a homonymous (same name) logger returned by LoggerFactory. Note that this method is only called during deserialization.

      This approach will work well if the desired ILoggerFactory is the one referenced by LoggerFactory. However, if the user manages its logger hierarchy through a different (non-static) mechanism, e.g. dependency injection, then this approach would be mostly counterproductive.

      Returns:
      logger with same name as returned by LoggerFactory
      Throws:
      ObjectStreamException