org.slf4j.impl

Class SimpleLogger

    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void debug(String msg)
      A NOP implementation, as this logger is permanently disabled for the DEBUG level.
      void debug(String format, Object param1)
      A NOP implementation, as this logger is permanently disabled for the DEBUG level.
      void debug(String format, Object[] argArray)
      Log a message at the DEBUG level according to the specified format and arguments.
      void debug(String format, Object param1, Object param2)
      A NOP implementation, as this logger is permanently disabled for the DEBUG level.
      void debug(String msg, Throwable t)
      A NOP implementation, as this logger is permanently disabled for the DEBUG level.
      void error(String msg)
      A simple implementation which always logs messages of level ERROR according to the format outlined above.
      void error(String format, Object arg)
      Perform single parameter substitution before logging the message of level ERROR according to the format outlined above.
      void error(String format, Object[] argArray)
      Perform double parameter substitution before logging the message of level ERROR according to the format outlined above.
      void error(String format, Object arg1, Object arg2)
      Perform double parameter substitution before logging the message of level ERROR according to the format outlined above.
      void error(String msg, Throwable t)
      Log a message of level ERROR, including an exception.
      String getName()
      Return the name of this Logger instance.
      void info(String msg)
      A simple implementation which always logs messages of level INFO according to the format outlined above.
      void info(String format, Object arg)
      Perform single parameter substitution before logging the message of level INFO according to the format outlined above.
      void info(String format, Object[] argArray)
      Perform double parameter substitution before logging the message of level INFO according to the format outlined above.
      void info(String format, Object arg1, Object arg2)
      Perform double parameter substitution before logging the message of level INFO according to the format outlined above.
      void info(String msg, Throwable t)
      Log a message of level INFO, including an exception.
      boolean isDebugEnabled()
      Always returns false.
      boolean isErrorEnabled()
      Always returns true.
      boolean isInfoEnabled()
      Always returns true.
      boolean isTraceEnabled()
      Always returns false.
      boolean isWarnEnabled()
      Always returns true.
      protected Object readResolve()
      Replace this instance with a homonymous (same name) logger returned by LoggerFactory.
      void trace(String msg)
      A NOP implementation, as this logger is permanently disabled for the TRACE level.
      void trace(String format, Object param1)
      A NOP implementation, as this logger is permanently disabled for the TRACE level.
      void trace(String format, Object[] argArray)
      Log a message at the TRACE level according to the specified format and arguments.
      void trace(String format, Object param1, Object param2)
      A NOP implementation, as this logger is permanently disabled for the TRACE level.
      void trace(String msg, Throwable t)
      A NOP implementation, as this logger is permanently disabled for the TRACE level.
      void warn(String msg)
      A simple implementation which always logs messages of level WARN according to the format outlined above.
      void warn(String format, Object arg)
      Perform single parameter substitution before logging the message of level WARN according to the format outlined above.
      void warn(String format, Object[] argArray)
      Perform double parameter substitution before logging the message of level WARN according to the format outlined above.
      void warn(String format, Object arg1, Object arg2)
      Perform double parameter substitution before logging the message of level WARN according to the format outlined above.
      void warn(String msg, Throwable t)
      Log a message of level WARN, including an exception.
    • Field Detail

      • LINE_SEPARATOR

        public static final String LINE_SEPARATOR
    • Method Detail

      • isTraceEnabled

        public boolean isTraceEnabled()
        Always returns false.
        Returns:
        always false
      • trace

        public void trace(String msg)
        A NOP implementation, as this logger is permanently disabled for the TRACE level.
        Parameters:
        msg - the message string to be logged
      • trace

        public void trace(String format,
                 Object param1)
        A NOP implementation, as this logger is permanently disabled for the TRACE level.
        Parameters:
        format - the format string
        param1 - the argument
      • trace

        public void trace(String format,
                 Object param1,
                 Object param2)
        A NOP implementation, as this logger is permanently disabled for the TRACE level.
        Parameters:
        format - the format string
        param1 - the first argument
        param2 - the second argument
      • trace

        public void trace(String format,
                 Object[] argArray)
        Description copied from interface: Logger
        Log a message at the TRACE level according to the specified format and arguments.

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

        Parameters:
        format - the format string
        argArray - an array of arguments
      • trace

        public void trace(String msg,
                 Throwable t)
        A NOP implementation, as this logger is permanently disabled for the TRACE level.
        Parameters:
        msg - the message accompanying the exception
        t - the exception (throwable) to log
      • isDebugEnabled

        public boolean isDebugEnabled()
        Always returns false.
        Returns:
        always false
      • debug

        public void debug(String msg)
        A NOP implementation, as this logger is permanently disabled for the DEBUG level.
        Parameters:
        msg - the message string to be logged
      • debug

        public void debug(String format,
                 Object param1)
        A NOP implementation, as this logger is permanently disabled for the DEBUG level.
        Parameters:
        format - the format string
        param1 - the argument
      • debug

        public void debug(String format,
                 Object param1,
                 Object param2)
        A NOP implementation, as this logger is permanently disabled for the DEBUG level.
        Parameters:
        format - the format string
        param1 - the first argument
        param2 - the second argument
      • debug

        public void debug(String format,
                 Object[] argArray)
        Description copied from interface: Logger
        Log a message at the DEBUG level according to the specified format and arguments.

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

        Parameters:
        format - the format string
        argArray - an array of arguments
      • debug

        public void debug(String msg,
                 Throwable t)
        A NOP implementation, as this logger is permanently disabled for the DEBUG level.
        Parameters:
        msg - the message accompanying the exception
        t - the exception (throwable) to log
      • isInfoEnabled

        public boolean isInfoEnabled()
        Always returns true.
        Returns:
        True if this Logger is enabled for the INFO level, false otherwise.
      • info

        public void info(String msg)
        A simple implementation which always logs messages of level INFO according to the format outlined above.
        Parameters:
        msg - the message string to be logged
      • info

        public void info(String format,
                Object arg)
        Perform single parameter substitution before logging the message of level INFO according to the format outlined above.
        Parameters:
        format - the format string
        arg - the argument
      • info

        public void info(String format,
                Object arg1,
                Object arg2)
        Perform double parameter substitution before logging the message of level INFO according to the format outlined above.
        Parameters:
        format - the format string
        arg1 - the first argument
        arg2 - the second argument
      • info

        public void info(String format,
                Object[] argArray)
        Perform double parameter substitution before logging the message of level INFO according to the format outlined above.
        Parameters:
        format - the format string
        argArray - an array of arguments
      • info

        public void info(String msg,
                Throwable t)
        Log a message of level INFO, including an exception.
        Parameters:
        msg - the message accompanying the exception
        t - the exception (throwable) to log
      • isWarnEnabled

        public boolean isWarnEnabled()
        Always returns true.
        Returns:
        True if this Logger is enabled for the WARN level, false otherwise.
      • warn

        public void warn(String msg)
        A simple implementation which always logs messages of level WARN according to the format outlined above.
        Parameters:
        msg - the message string to be logged
      • warn

        public void warn(String format,
                Object arg)
        Perform single parameter substitution before logging the message of level WARN according to the format outlined above.
        Parameters:
        format - the format string
        arg - the argument
      • warn

        public void warn(String format,
                Object arg1,
                Object arg2)
        Perform double parameter substitution before logging the message of level WARN according to the format outlined above.
        Parameters:
        format - the format string
        arg1 - the first argument
        arg2 - the second argument
      • warn

        public void warn(String format,
                Object[] argArray)
        Perform double parameter substitution before logging the message of level WARN according to the format outlined above.
        Parameters:
        format - the format string
        argArray - an array of arguments
      • warn

        public void warn(String msg,
                Throwable t)
        Log a message of level WARN, including an exception.
        Parameters:
        msg - the message accompanying the exception
        t - the exception (throwable) to log
      • isErrorEnabled

        public boolean isErrorEnabled()
        Always returns true.
        Returns:
        True if this Logger is enabled for the ERROR level, false otherwise.
      • error

        public void error(String msg)
        A simple implementation which always logs messages of level ERROR according to the format outlined above.
        Parameters:
        msg - the message string to be logged
      • error

        public void error(String format,
                 Object arg)
        Perform single parameter substitution before logging the message of level ERROR according to the format outlined above.
        Parameters:
        format - the format string
        arg - the argument
      • error

        public void error(String format,
                 Object arg1,
                 Object arg2)
        Perform double parameter substitution before logging the message of level ERROR according to the format outlined above.
        Parameters:
        format - the format string
        arg1 - the first argument
        arg2 - the second argument
      • error

        public void error(String format,
                 Object[] argArray)
        Perform double parameter substitution before logging the message of level ERROR according to the format outlined above.
        Parameters:
        format - the format string
        argArray - an array of arguments
      • error

        public void error(String msg,
                 Throwable t)
        Log a message of level ERROR, including an exception.
        Parameters:
        msg - the message accompanying the exception
        t - the exception (throwable) to log
      • getName

        public String getName()
        Description copied from interface: Logger
        Return the name of this Logger instance.
        Specified by:
        getName in interface Logger
      • readResolve

        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 references 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

Copyright © 2005-2012 QOS.ch. All Rights Reserved.