Class EnvironmentLoggingApplicationListener

java.lang.Object
org.springframework.geode.context.logging.EnvironmentLoggingApplicationListener
All Implemented Interfaces:
EventListener, org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>

public class EnvironmentLoggingApplicationListener extends Object implements org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
Spring ApplicationListener used to log the state of the Spring Environment on the ContextRefreshedEvent.
Since:
1.4.0
See Also:
  • Logger
  • LoggerFactory
  • ApplicationListener
  • ContextRefreshedEvent
  • Environment
  • PropertySource
  • Field Details

  • Constructor Details

    • EnvironmentLoggingApplicationListener

      public EnvironmentLoggingApplicationListener()
  • Method Details

    • onApplicationEvent

      public void onApplicationEvent(@NonNull org.springframework.context.event.ContextRefreshedEvent contextRefreshedEvent)
      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
    • getCompositePropertySourceLoggingFunction

      protected Function<org.springframework.core.env.PropertySource<?>,org.springframework.core.env.PropertySource<?>> getCompositePropertySourceLoggingFunction()
      Returns a Composite Function capable of introspecting and logging properties from specifically typed PropertySources.
      Returns:
      a Composite Function capable of introspecting and logging the properties from specifically typed PropertySources.
      See Also:
    • getLogger

      @NonNull protected org.slf4j.Logger getLogger()
      Gets a reference to the configured SLF4J Logger.
      Returns:
      a reference to the configured SLF4J Logger.
      See Also:
      • Logger
    • log

      protected void log(String message, Object... args)
      Logs the given message formatted with the given array of arguments to the configured Spring Boot application log. The given message will only be logged if it contains text, otherwise this method does nothing and silently returns.
      Parameters:
      message - String containing the message to log.
      args - optional array of arguments to apply when formatting the message.
      See Also:
      • logToSlf4jLogger(String, Object...)
      • logToSystemErr(String, Object...)