Class DeferredLogs

java.lang.Object
org.springframework.boot.logging.DeferredLogs
All Implemented Interfaces:
DeferredLogFactory

public class DeferredLogs extends Object implements DeferredLogFactory
A DeferredLogFactory implementation that manages a collection DeferredLog instances.
Since:
2.4.0
  • Constructor Details

    • DeferredLogs

      public DeferredLogs()
  • Method Details

    • getLog

      public org.apache.commons.logging.Log getLog(Class<?> destination)
      Create a new DeferredLog for the given destination.
      Specified by:
      getLog in interface DeferredLogFactory
      Parameters:
      destination - the ultimate log destination
      Returns:
      a deferred log instance that will switch to the destination when appropriate.
    • getLog

      public org.apache.commons.logging.Log getLog(org.apache.commons.logging.Log destination)
      Create a new DeferredLog for the given destination.
      Specified by:
      getLog in interface DeferredLogFactory
      Parameters:
      destination - the ultimate log destination
      Returns:
      a deferred log instance that will switch to the destination when appropriate.
    • getLog

      public org.apache.commons.logging.Log getLog(Supplier<org.apache.commons.logging.Log> destination)
      Create a new DeferredLog for the given destination.
      Specified by:
      getLog in interface DeferredLogFactory
      Parameters:
      destination - the ultimate log destination
      Returns:
      a deferred log instance that will switch to the destination when appropriate.
    • switchOverAll

      public void switchOverAll()
      Switch over all deferred logs to their supplied destination.