org.apache.commons.logging.impl

Class NoOpLog

  • java.lang.Object
    • org.apache.commons.logging.impl.NoOpLog
  • All Implemented Interfaces:
    java.io.Serializable, Log
    Direct Known Subclasses:
    SimpleLog


    public class NoOpLog
    extends java.lang.Object
    implements Log, java.io.Serializable
    Trivial implementation of Log that throws away all messages.
    Since:
    5.0
    Author:
    Juergen Hoeller (for the spring-jcl variant)
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      NoOpLog() 
      NoOpLog(java.lang.String name) 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void debug(java.lang.Object message)
      Logs a message with debug log level.
      void debug(java.lang.Object message, java.lang.Throwable t)
      Logs an error with debug log level.
      void error(java.lang.Object message)
      Logs a message with error log level.
      void error(java.lang.Object message, java.lang.Throwable t)
      Logs an error with error log level.
      void fatal(java.lang.Object message)
      Logs a message with fatal log level.
      void fatal(java.lang.Object message, java.lang.Throwable t)
      Logs an error with fatal log level.
      void info(java.lang.Object message)
      Logs a message with info log level.
      void info(java.lang.Object message, java.lang.Throwable t)
      Logs an error with info log level.
      boolean isDebugEnabled()
      Is debug logging currently enabled?
      boolean isErrorEnabled()
      Is error logging currently enabled?
      boolean isFatalEnabled()
      Is fatal logging currently enabled?
      boolean isInfoEnabled()
      Is info logging currently enabled?
      boolean isTraceEnabled()
      Is trace logging currently enabled?
      boolean isWarnEnabled()
      Is warn logging currently enabled?
      void trace(java.lang.Object message)
      Logs a message with trace log level.
      void trace(java.lang.Object message, java.lang.Throwable t)
      Logs an error with trace log level.
      void warn(java.lang.Object message)
      Logs a message with warn log level.
      void warn(java.lang.Object message, java.lang.Throwable t)
      Logs an error with warn log level.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NoOpLog

        public NoOpLog()
      • NoOpLog

        public NoOpLog(java.lang.String name)
    • Method Detail

      • isFatalEnabled

        public boolean isFatalEnabled()
        Description copied from interface: Log
        Is fatal logging currently enabled?

        Call this method to prevent having to perform expensive operations (for example, String concatenation) when the log level is more than fatal.

        Specified by:
        isFatalEnabled in interface Log
        Returns:
        true if fatal is enabled in the underlying logger.
      • isErrorEnabled

        public boolean isErrorEnabled()
        Description copied from interface: Log
        Is error logging currently enabled?

        Call this method to prevent having to perform expensive operations (for example, String concatenation) when the log level is more than error.

        Specified by:
        isErrorEnabled in interface Log
        Returns:
        true if error is enabled in the underlying logger.
      • isWarnEnabled

        public boolean isWarnEnabled()
        Description copied from interface: Log
        Is warn logging currently enabled?

        Call this method to prevent having to perform expensive operations (for example, String concatenation) when the log level is more than warn.

        Specified by:
        isWarnEnabled in interface Log
        Returns:
        true if warn is enabled in the underlying logger.
      • isInfoEnabled

        public boolean isInfoEnabled()
        Description copied from interface: Log
        Is info logging currently enabled?

        Call this method to prevent having to perform expensive operations (for example, String concatenation) when the log level is more than info.

        Specified by:
        isInfoEnabled in interface Log
        Returns:
        true if info is enabled in the underlying logger.
      • isDebugEnabled

        public boolean isDebugEnabled()
        Description copied from interface: Log
        Is debug logging currently enabled?

        Call this method to prevent having to perform expensive operations (for example, String concatenation) when the log level is more than debug.

        Specified by:
        isDebugEnabled in interface Log
        Returns:
        true if debug is enabled in the underlying logger.
      • isTraceEnabled

        public boolean isTraceEnabled()
        Description copied from interface: Log
        Is trace logging currently enabled?

        Call this method to prevent having to perform expensive operations (for example, String concatenation) when the log level is more than trace.

        Specified by:
        isTraceEnabled in interface Log
        Returns:
        true if trace is enabled in the underlying logger.
      • fatal

        public void fatal(java.lang.Object message)
        Description copied from interface: Log
        Logs a message with fatal log level.
        Specified by:
        fatal in interface Log
        Parameters:
        message - log this message
      • fatal

        public void fatal(java.lang.Object message,
                          java.lang.Throwable t)
        Description copied from interface: Log
        Logs an error with fatal log level.
        Specified by:
        fatal in interface Log
        Parameters:
        message - log this message
        t - log this cause
      • error

        public void error(java.lang.Object message)
        Description copied from interface: Log
        Logs a message with error log level.
        Specified by:
        error in interface Log
        Parameters:
        message - log this message
      • error

        public void error(java.lang.Object message,
                          java.lang.Throwable t)
        Description copied from interface: Log
        Logs an error with error log level.
        Specified by:
        error in interface Log
        Parameters:
        message - log this message
        t - log this cause
      • warn

        public void warn(java.lang.Object message)
        Description copied from interface: Log
        Logs a message with warn log level.
        Specified by:
        warn in interface Log
        Parameters:
        message - log this message
      • warn

        public void warn(java.lang.Object message,
                         java.lang.Throwable t)
        Description copied from interface: Log
        Logs an error with warn log level.
        Specified by:
        warn in interface Log
        Parameters:
        message - log this message
        t - log this cause
      • info

        public void info(java.lang.Object message)
        Description copied from interface: Log
        Logs a message with info log level.
        Specified by:
        info in interface Log
        Parameters:
        message - log this message
      • info

        public void info(java.lang.Object message,
                         java.lang.Throwable t)
        Description copied from interface: Log
        Logs an error with info log level.
        Specified by:
        info in interface Log
        Parameters:
        message - log this message
        t - log this cause
      • debug

        public void debug(java.lang.Object message)
        Description copied from interface: Log
        Logs a message with debug log level.
        Specified by:
        debug in interface Log
        Parameters:
        message - log this message
      • debug

        public void debug(java.lang.Object message,
                          java.lang.Throwable t)
        Description copied from interface: Log
        Logs an error with debug log level.
        Specified by:
        debug in interface Log
        Parameters:
        message - log this message
        t - log this cause
      • trace

        public void trace(java.lang.Object message)
        Description copied from interface: Log
        Logs a message with trace log level.
        Specified by:
        trace in interface Log
        Parameters:
        message - log this message
      • trace

        public void trace(java.lang.Object message,
                          java.lang.Throwable t)
        Description copied from interface: Log
        Logs an error with trace log level.
        Specified by:
        trace in interface Log
        Parameters:
        message - log this message
        t - log this cause