Class LoggingRebinder

java.lang.Object
org.springframework.cloud.logging.LoggingRebinder
All Implemented Interfaces:
EventListener, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationListener<EnvironmentChangeEvent>, org.springframework.context.EnvironmentAware

public class LoggingRebinder extends Object implements org.springframework.context.ApplicationListener<EnvironmentChangeEvent>, org.springframework.context.EnvironmentAware
Listener that looks for EnvironmentChangeEvent and rebinds logger levels if any changed.
Author:
Dave Syer, Olga Maciaszek-Sharma
  • Constructor Details

    • LoggingRebinder

      public LoggingRebinder()
  • Method Details

    • setEnvironment

      public void setEnvironment(org.springframework.core.env.Environment environment)
      Specified by:
      setEnvironment in interface org.springframework.context.EnvironmentAware
    • onApplicationEvent

      public void onApplicationEvent(EnvironmentChangeEvent event)
      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener<EnvironmentChangeEvent>
    • setLogLevels

      protected void setLogLevels(org.springframework.boot.logging.LoggingSystem system, org.springframework.core.env.Environment environment)