Class VoidLogger

  • All Implemented Interfaces:
    Logger

    @Deprecated
    public class VoidLogger
    extends Object
    implements Logger
    Deprecated.
    starting with 3.1M2 use SLF4J's NOPLogger instead: NOPLogger.NOP_LOGGER
    Logger that doesn't do anything. Useful to use when no logger implementation is selected to prevent NPEs. In a component-based environment loggers are always set but when component classes are used as simple Java Beans the logger needs to be set and this logger implementation can be used when the user doesn't set explicitly a logger.
    Since:
    1.8RC3
    Version:
    $Id: 621e2e2ca3bd4a0471efe20dfa40968b68cb9626 $
    • Constructor Summary

      Constructors 
      Constructor Description
      VoidLogger()
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void debug​(String message)
      Deprecated.
      Log a message with the debug priority.
      void debug​(String message, Object... objects)
      Deprecated.
      Logs the message to the logger with debug priority while expanding the message with the objects passed.
      void debug​(String message, Throwable throwable)
      Deprecated.
      Log a message with the debug priority, also printing the exception that caused this message, along with its stack trace.
      void debug​(String message, Throwable throwable, Object... objects)
      Deprecated.
      Logs the message to the logger with debug priority while expanding the message with the objects passed, also printing the exception that caused this message, along with its stack trace.
      void error​(String message)
      Deprecated.
      Log a message with the error priority.
      void error​(String message, Object... objects)
      Deprecated.
      Logs the message to the logger with error priority while expanding the message with the objects passed.
      void error​(String message, Throwable throwable)
      Deprecated.
      Log a message with the error priority, also printing the exception that caused this message, along with its stack trace.
      void error​(String message, Throwable throwable, Object... objects)
      Deprecated.
      Logs the message to the logger with error priority while expanding the message with the objects passed, also printing the exception that caused this message, along with its stack trace.
      void info​(String message)
      Deprecated.
      Log a message with the info priority.
      void info​(String message, Object... objects)
      Deprecated.
      Logs the message to the logger with info priority while expanding the message with the objects passed.
      void info​(String message, Throwable throwable)
      Deprecated.
      Log a message with the info priority, also printing the exception that caused this message, along with its stack trace.
      void info​(String message, Throwable throwable, Object... objects)
      Deprecated.
      Logs the message to the logger with info priority while expanding the message with the objects passed, also printing the exception that caused this message, along with its stack trace.
      boolean isDebugEnabled()
      Deprecated.
      Check if the debug priority is enabled.
      boolean isErrorEnabled()
      Deprecated.
      Check if the error priority is enabled.
      boolean isInfoEnabled()
      Deprecated.
      Check if the info priority is enabled.
      boolean isWarnEnabled()
      Deprecated.
      Check if the warn priority is enabled.
      void warn​(String message)
      Deprecated.
      Log a message with the warn priority.
      void warn​(String message, Object... objects)
      Deprecated.
      Logs the message to the logger with warn priority while expanding the message with the objects passed.
      void warn​(String message, Throwable throwable)
      Deprecated.
      Log a message with the warn priority, also printing the exception that caused this message, along with its stack trace.
      void warn​(String message, Throwable throwable, Object... objects)
      Deprecated.
      Logs the message to the logger with warn priority while expanding the message with the objects passed, also printing the exception that caused this message, along with its stack trace.
    • Constructor Detail

      • VoidLogger

        public VoidLogger()
        Deprecated.
    • Method Detail

      • debug

        public void debug​(String message)
        Deprecated.
        Description copied from interface: Logger
        Log a message with the debug priority.
        Specified by:
        debug in interface Logger
        Parameters:
        message - The message to be logged. No further processing of the message is performed.
      • debug

        public void debug​(String message,
                          Throwable throwable)
        Deprecated.
        Description copied from interface: Logger
        Log a message with the debug priority, also printing the exception that caused this message, along with its stack trace.
        Specified by:
        debug in interface Logger
        Parameters:
        message - The message to be logged. No further processing of the message is performed.
        throwable - The exception associated with the message, for stack trace output.
      • debug

        public void debug​(String message,
                          Object... objects)
        Deprecated.
        Description copied from interface: Logger

        Logs the message to the logger with debug priority while expanding the message with the objects passed. The message uses the MessageFormat syntax.

        Example: log.debug("Doc was created on {0} and was changed {1} times", date, 5); log.debug("There {0,choice,0#are|1#is|1<are} {0,choice,0#no|1#one|1<{0}} file{0,choice,0#s|1#|1<s}", nrFiles);

        The logged message will only be formatted if the message is actually logged.

        Specified by:
        debug in interface Logger
        Parameters:
        message - The message to be formatted via MessageFormat
        objects - The objects to be filled into the message
        See Also:
        MessageFormat
      • debug

        public void debug​(String message,
                          Throwable throwable,
                          Object... objects)
        Deprecated.
        Description copied from interface: Logger

        Logs the message to the logger with debug priority while expanding the message with the objects passed, also printing the exception that caused this message, along with its stack trace. The message uses the MessageFormat syntax.

        Example: log.debug("Unhandled exception while executing the query [{0}]", exception, query);

        The logged message will only be assembled if the message is actually logged.

        Specified by:
        debug in interface Logger
        Parameters:
        message - The message to be formatted via MessageFormat
        throwable - The exception associated with the message, for stack trace output.
        objects - The objects to be filled into the message
        See Also:
        MessageFormat
      • error

        public void error​(String message)
        Deprecated.
        Description copied from interface: Logger
        Log a message with the error priority.
        Specified by:
        error in interface Logger
        Parameters:
        message - The message to be logged. No further processing of the message is performed.
      • error

        public void error​(String message,
                          Throwable throwable)
        Deprecated.
        Description copied from interface: Logger
        Log a message with the error priority, also printing the exception that caused this message, along with its stack trace.
        Specified by:
        error in interface Logger
        Parameters:
        message - The message to be logged. No further processing of the message is performed.
        throwable - The exception associated with the message, for stack trace output.
      • error

        public void error​(String message,
                          Object... objects)
        Deprecated.
        Description copied from interface: Logger

        Logs the message to the logger with error priority while expanding the message with the objects passed. The message uses the MessageFormat syntax.

        Example: log.error("Doc was created on {0} and was changed {1} times", date, 5); log.error("There {0,choice,0#are|1#is|1<are} {0,choice,0#no|1#one|1<{0}} file{0,choice,0#s|1#|1<s}", nrFiles);

        The logged message will only be assembled if the message is actually logged.

        Specified by:
        error in interface Logger
        Parameters:
        message - The message to be formatted via MessageFormat
        objects - The objects to be filled into the message
        See Also:
        MessageFormat
      • error

        public void error​(String message,
                          Throwable throwable,
                          Object... objects)
        Deprecated.
        Description copied from interface: Logger

        Logs the message to the logger with error priority while expanding the message with the objects passed, also printing the exception that caused this message, along with its stack trace. The message uses the MessageFormat syntax.

        Example: log.error("Unhandled exception while executing the query [{0}]", exception, query);

        The logged message will only be assembled if the message is actually logged.

        Specified by:
        error in interface Logger
        Parameters:
        message - The message to be formatted via MessageFormat
        throwable - The exception associated with the message, for stack trace output.
        objects - The objects to be filled into the message
        See Also:
        MessageFormat
      • info

        public void info​(String message)
        Deprecated.
        Description copied from interface: Logger
        Log a message with the info priority.
        Specified by:
        info in interface Logger
        Parameters:
        message - The message to be logged. No further processing of the message is performed.
      • info

        public void info​(String message,
                         Throwable throwable)
        Deprecated.
        Description copied from interface: Logger
        Log a message with the info priority, also printing the exception that caused this message, along with its stack trace.
        Specified by:
        info in interface Logger
        Parameters:
        message - The message to be logged. No further processing of the message is performed.
        throwable - The exception associated with the message, for stack trace output.
      • info

        public void info​(String message,
                         Object... objects)
        Deprecated.
        Description copied from interface: Logger

        Logs the message to the logger with info priority while expanding the message with the objects passed. The message uses the MessageFormat syntax.

        Example: log.info("Doc was created on {0} and was changed {1} times", date, 5); log.info("There {0,choice,0#are|1#is|1<are} {0,choice,0#no|1#one|1<{0}} file{0,choice,0#s|1#|1<s}", nrFiles);

        The logged message will only be assembled if the message is actually logged.

        Specified by:
        info in interface Logger
        Parameters:
        message - The message to be formatted via MessageFormat
        objects - The objects to be filled into the message
        See Also:
        MessageFormat
      • info

        public void info​(String message,
                         Throwable throwable,
                         Object... objects)
        Deprecated.
        Description copied from interface: Logger

        Logs the message to the logger with info priority while expanding the message with the objects passed, also printing the exception that caused this message, along with its stack trace. The message uses the MessageFormat syntax.

        Example: log.info("Unhandled exception while executing the query [{0}]", exception, query);

        The logged message will only be assembled if the message is actually logged.

        Specified by:
        info in interface Logger
        Parameters:
        message - The message to be formatted via MessageFormat
        throwable - The exception associated with the message, for stack trace output.
        objects - The objects to be filled into the message
        See Also:
        MessageFormat
      • isDebugEnabled

        public boolean isDebugEnabled()
        Deprecated.
        Description copied from interface: Logger
        Check if the debug priority is enabled.
        Specified by:
        isDebugEnabled in interface Logger
        Returns:
        true if messages with debug priority will be logged, false otherwise
      • isErrorEnabled

        public boolean isErrorEnabled()
        Deprecated.
        Description copied from interface: Logger
        Check if the error priority is enabled.
        Specified by:
        isErrorEnabled in interface Logger
        Returns:
        true if messages with error priority will be logged, false otherwise
      • isInfoEnabled

        public boolean isInfoEnabled()
        Deprecated.
        Description copied from interface: Logger
        Check if the info priority is enabled.
        Specified by:
        isInfoEnabled in interface Logger
        Returns:
        true if messages with info priority will be logged, false otherwise
      • isWarnEnabled

        public boolean isWarnEnabled()
        Deprecated.
        Description copied from interface: Logger
        Check if the warn priority is enabled.
        Specified by:
        isWarnEnabled in interface Logger
        Returns:
        true if messages with warn priority will be logged, false otherwise
      • warn

        public void warn​(String message)
        Deprecated.
        Description copied from interface: Logger
        Log a message with the warn priority.
        Specified by:
        warn in interface Logger
        Parameters:
        message - The message to be logged. No further processing of the message is performed.
      • warn

        public void warn​(String message,
                         Throwable throwable)
        Deprecated.
        Description copied from interface: Logger
        Log a message with the warn priority, also printing the exception that caused this message, along with its stack trace.
        Specified by:
        warn in interface Logger
        Parameters:
        message - The message to be logged. No further processing of the message is performed.
        throwable - The exception associated with the message, for stack trace output.
      • warn

        public void warn​(String message,
                         Object... objects)
        Deprecated.
        Description copied from interface: Logger

        Logs the message to the logger with warn priority while expanding the message with the objects passed. The message uses the MessageFormat syntax.

        Example: log.warn("Doc was created on {0} and was changed {1} times", date, 5); log.warn("There {0,choice,0#are|1#is|1<are} {0,choice,0#no|1#one|1<{0}} file{0,choice,0#s|1#|1<s}", nrFiles);

        The logged message will only be assembled if the message is actually logged.

        Specified by:
        warn in interface Logger
        Parameters:
        message - The message to be formatted via MessageFormat
        objects - The objects to be filled into the message
        See Also:
        MessageFormat
      • warn

        public void warn​(String message,
                         Throwable throwable,
                         Object... objects)
        Deprecated.
        Description copied from interface: Logger

        Logs the message to the logger with warn priority while expanding the message with the objects passed, also printing the exception that caused this message, along with its stack trace. The message uses the MessageFormat syntax.

        Example: log.warn("Unhandled exception while executing the query [{0}]", exception, query);

        The logged message will only be assembled if the message is actually logged.

        Specified by:
        warn in interface Logger
        Parameters:
        message - The message to be formatted via MessageFormat
        throwable - The exception associated with the message, for stack trace output.
        objects - The objects to be filled into the message
        See Also:
        MessageFormat