org.springframework.boot.logging

Class DeferredLog

  • java.lang.Object
    • org.springframework.boot.logging.DeferredLog
  • All Implemented Interfaces:
    org.apache.commons.logging.Log


    public class DeferredLog
    extends java.lang.Object
    implements org.apache.commons.logging.Log
    Deferred Log that can be used to store messages that shouldn't be written until the logging system is fully initialized.
    Since:
    1.3.0
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void debug(java.lang.Object message) 
      void debug(java.lang.Object message, java.lang.Throwable t) 
      void error(java.lang.Object message) 
      void error(java.lang.Object message, java.lang.Throwable t) 
      void fatal(java.lang.Object message) 
      void fatal(java.lang.Object message, java.lang.Throwable t) 
      void info(java.lang.Object message) 
      void info(java.lang.Object message, java.lang.Throwable t) 
      boolean isDebugEnabled() 
      boolean isErrorEnabled() 
      boolean isFatalEnabled() 
      boolean isInfoEnabled() 
      boolean isTraceEnabled() 
      boolean isWarnEnabled() 
      static org.apache.commons.logging.Log replay(org.apache.commons.logging.Log source, java.lang.Class<?> destination)
      Replay from a source log to a destination log when the source is deferred.
      static org.apache.commons.logging.Log replay(org.apache.commons.logging.Log source, org.apache.commons.logging.Log destination)
      Replay from a source log to a destination log when the source is deferred.
      void replayTo(java.lang.Class<?> destination)
      Replay deferred logging to the specified destination.
      void replayTo(org.apache.commons.logging.Log destination)
      Replay deferred logging to the specified destination.
      void switchTo(java.lang.Class<?> destination)
      Switch from deferred logging to immediate logging to the specified destination.
      void switchTo(org.apache.commons.logging.Log destination)
      Switch from deferred logging to immediate logging to the specified destination.
      void trace(java.lang.Object message) 
      void trace(java.lang.Object message, java.lang.Throwable t) 
      void warn(java.lang.Object message) 
      void warn(java.lang.Object message, java.lang.Throwable t) 
      • Methods inherited from class java.lang.Object

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

      • DeferredLog

        public DeferredLog()
        Create a new DeferredLog instance.
    • Method Detail

      • isTraceEnabled

        public boolean isTraceEnabled()
        Specified by:
        isTraceEnabled in interface org.apache.commons.logging.Log
      • isDebugEnabled

        public boolean isDebugEnabled()
        Specified by:
        isDebugEnabled in interface org.apache.commons.logging.Log
      • isInfoEnabled

        public boolean isInfoEnabled()
        Specified by:
        isInfoEnabled in interface org.apache.commons.logging.Log
      • isWarnEnabled

        public boolean isWarnEnabled()
        Specified by:
        isWarnEnabled in interface org.apache.commons.logging.Log
      • isErrorEnabled

        public boolean isErrorEnabled()
        Specified by:
        isErrorEnabled in interface org.apache.commons.logging.Log
      • isFatalEnabled

        public boolean isFatalEnabled()
        Specified by:
        isFatalEnabled in interface org.apache.commons.logging.Log
      • trace

        public void trace(java.lang.Object message)
        Specified by:
        trace in interface org.apache.commons.logging.Log
      • trace

        public void trace(java.lang.Object message,
                          java.lang.Throwable t)
        Specified by:
        trace in interface org.apache.commons.logging.Log
      • debug

        public void debug(java.lang.Object message)
        Specified by:
        debug in interface org.apache.commons.logging.Log
      • debug

        public void debug(java.lang.Object message,
                          java.lang.Throwable t)
        Specified by:
        debug in interface org.apache.commons.logging.Log
      • info

        public void info(java.lang.Object message)
        Specified by:
        info in interface org.apache.commons.logging.Log
      • info

        public void info(java.lang.Object message,
                         java.lang.Throwable t)
        Specified by:
        info in interface org.apache.commons.logging.Log
      • warn

        public void warn(java.lang.Object message)
        Specified by:
        warn in interface org.apache.commons.logging.Log
      • warn

        public void warn(java.lang.Object message,
                         java.lang.Throwable t)
        Specified by:
        warn in interface org.apache.commons.logging.Log
      • error

        public void error(java.lang.Object message)
        Specified by:
        error in interface org.apache.commons.logging.Log
      • error

        public void error(java.lang.Object message,
                          java.lang.Throwable t)
        Specified by:
        error in interface org.apache.commons.logging.Log
      • fatal

        public void fatal(java.lang.Object message)
        Specified by:
        fatal in interface org.apache.commons.logging.Log
      • fatal

        public void fatal(java.lang.Object message,
                          java.lang.Throwable t)
        Specified by:
        fatal in interface org.apache.commons.logging.Log
      • switchTo

        public void switchTo(java.lang.Class<?> destination)
        Switch from deferred logging to immediate logging to the specified destination.
        Parameters:
        destination - the new log destination
        Since:
        2.1.0
      • switchTo

        public void switchTo(org.apache.commons.logging.Log destination)
        Switch from deferred logging to immediate logging to the specified destination.
        Parameters:
        destination - the new log destination
        Since:
        2.1.0
      • replayTo

        public void replayTo(java.lang.Class<?> destination)
        Replay deferred logging to the specified destination.
        Parameters:
        destination - the destination for the deferred log messages
      • replayTo

        public void replayTo(org.apache.commons.logging.Log destination)
        Replay deferred logging to the specified destination.
        Parameters:
        destination - the destination for the deferred log messages
      • replay

        public static org.apache.commons.logging.Log replay(org.apache.commons.logging.Log source,
                                                            java.lang.Class<?> destination)
        Replay from a source log to a destination log when the source is deferred.
        Parameters:
        source - the source logger
        destination - the destination logger class
        Returns:
        the destination
      • replay

        public static org.apache.commons.logging.Log replay(org.apache.commons.logging.Log source,
                                                            org.apache.commons.logging.Log destination)
        Replay from a source log to a destination log when the source is deferred.
        Parameters:
        source - the source logger
        destination - the destination logger
        Returns:
        the destination