Class DeferredLog

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

public class DeferredLog extends Object implements 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
Author:
Phillip Webb
  • Constructor Details

    • DeferredLog

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

    • isTraceEnabled

      public boolean isTraceEnabled()
      Specified by:
      isTraceEnabled in interface Log
    • isDebugEnabled

      public boolean isDebugEnabled()
      Specified by:
      isDebugEnabled in interface Log
    • isInfoEnabled

      public boolean isInfoEnabled()
      Specified by:
      isInfoEnabled in interface Log
    • isWarnEnabled

      public boolean isWarnEnabled()
      Specified by:
      isWarnEnabled in interface Log
    • isErrorEnabled

      public boolean isErrorEnabled()
      Specified by:
      isErrorEnabled in interface Log
    • isFatalEnabled

      public boolean isFatalEnabled()
      Specified by:
      isFatalEnabled in interface Log
    • trace

      public void trace(Object message)
      Specified by:
      trace in interface Log
    • trace

      public void trace(Object message, Throwable t)
      Specified by:
      trace in interface Log
    • debug

      public void debug(Object message)
      Specified by:
      debug in interface Log
    • debug

      public void debug(Object message, Throwable t)
      Specified by:
      debug in interface Log
    • info

      public void info(Object message)
      Specified by:
      info in interface Log
    • info

      public void info(Object message, Throwable t)
      Specified by:
      info in interface Log
    • warn

      public void warn(Object message)
      Specified by:
      warn in interface Log
    • warn

      public void warn(Object message, Throwable t)
      Specified by:
      warn in interface Log
    • error

      public void error(Object message)
      Specified by:
      error in interface Log
    • error

      public void error(Object message, Throwable t)
      Specified by:
      error in interface Log
    • fatal

      public void fatal(Object message)
      Specified by:
      fatal in interface Log
    • fatal

      public void fatal(Object message, Throwable t)
      Specified by:
      fatal in interface Log
    • switchTo

      public void switchTo(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(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(Class<?> destination)
      Replay deferred logging to the specified destination.
      Parameters:
      destination - the destination for the deferred log messages
    • replayTo

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

      public static Log replay(Log source, 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 Log replay(Log source, 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