Class LoggingSystemShutdownListener

java.lang.Object
org.springframework.cloud.bootstrap.LoggingSystemShutdownListener
All Implemented Interfaces:
EventListener, org.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent>, org.springframework.core.Ordered

public class LoggingSystemShutdownListener extends Object implements org.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent>, org.springframework.core.Ordered
Cleans up the logging system immediately after the bootstrap context is created on startup. Logging will go dark until the ConfigFileApplicationListener fires, but this is the price we pay for that listener being able to adjust the log levels according to what it finds in its own configuration.
Author:
Dave Syer
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Default order for the listener.

    Fields inherited from interface org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    void
    onApplicationEvent(org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent event)
     
    void
    setOrder(int order)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.context.ApplicationListener

    supportsAsyncExecution
  • Field Details

    • DEFAULT_ORDER

      public static final int DEFAULT_ORDER
      Default order for the listener.
      See Also:
  • Constructor Details

    • LoggingSystemShutdownListener

      public LoggingSystemShutdownListener()
  • Method Details

    • onApplicationEvent

      public void onApplicationEvent(org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent event)
      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent>
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered
    • setOrder

      public void setOrder(int order)