Class Log4j2CloudConfigLoggingSystem


  • public class Log4j2CloudConfigLoggingSystem
    extends org.springframework.boot.logging.log4j2.Log4J2LoggingSystem
    Override Spring's implementation of the Log4j 2 Logging System to properly support Spring Cloud Config.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.springframework.boot.logging.log4j2.Log4J2LoggingSystem

        org.springframework.boot.logging.log4j2.Log4J2LoggingSystem.Factory
      • Nested classes/interfaces inherited from class org.springframework.boot.logging.AbstractLoggingSystem

        org.springframework.boot.logging.AbstractLoggingSystem.LogLevels<T extends Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String ENVIRONMENT_KEY  
      • Fields inherited from class org.springframework.boot.logging.AbstractLoggingSystem

        CONFIGURATION_COMPARATOR
      • Fields inherited from class org.springframework.boot.logging.LoggingSystem

        NONE, ROOT_LOGGER_NAME, SYSTEM_PROPERTY
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cleanUp()  
      protected String[] getStandardConfigLocations()  
      void initialize​(org.springframework.boot.logging.LoggingInitializationContext initializationContext, String configLocation, org.springframework.boot.logging.LogFile logFile)
      Set the environment into the ExternalContext field so that it can be obtained by SpringLookup when it is constructed.
      protected void loadConfiguration​(String location, org.springframework.boot.logging.LogFile logFile)  
      protected void loadDefaults​(org.springframework.boot.logging.LoggingInitializationContext initializationContext, org.springframework.boot.logging.LogFile logFile)  
      • Methods inherited from class org.springframework.boot.logging.log4j2.Log4J2LoggingSystem

        beforeInitialize, getLoggerConfiguration, getLoggerConfigurations, getShutdownHandler, getSupportedLogLevels, isClassAvailable, loadConfiguration, reinitialize, setLogLevel
      • Methods inherited from class org.springframework.boot.logging.Slf4JLoggingSystem

        isBridgeHandlerAvailable, isBridgeJulIntoSlf4j
      • Methods inherited from class org.springframework.boot.logging.AbstractLoggingSystem

        applySystemProperties, getClassLoader, getPackagedConfigFile, getSelfInitializationConfig, getSpringConfigLocations, getSpringInitializationConfig
      • Methods inherited from class org.springframework.boot.logging.LoggingSystem

        get, getSystemProperties
    • Method Detail

      • initialize

        public void initialize​(org.springframework.boot.logging.LoggingInitializationContext initializationContext,
                               String configLocation,
                               org.springframework.boot.logging.LogFile logFile)
        Set the environment into the ExternalContext field so that it can be obtained by SpringLookup when it is constructed. Spring will replace the ExternalContext field with a String once initialization is complete.
        Overrides:
        initialize in class org.springframework.boot.logging.log4j2.Log4J2LoggingSystem
        Parameters:
        initializationContext - The initialization context.
        configLocation - The configuration location.
        logFile - the log file.
      • getStandardConfigLocations

        protected String[] getStandardConfigLocations()
        Overrides:
        getStandardConfigLocations in class org.springframework.boot.logging.log4j2.Log4J2LoggingSystem
      • loadDefaults

        protected void loadDefaults​(org.springframework.boot.logging.LoggingInitializationContext initializationContext,
                                    org.springframework.boot.logging.LogFile logFile)
        Overrides:
        loadDefaults in class org.springframework.boot.logging.log4j2.Log4J2LoggingSystem
      • loadConfiguration

        protected void loadConfiguration​(String location,
                                         org.springframework.boot.logging.LogFile logFile)
        Overrides:
        loadConfiguration in class org.springframework.boot.logging.log4j2.Log4J2LoggingSystem
      • cleanUp

        public void cleanUp()
        Overrides:
        cleanUp in class org.springframework.boot.logging.log4j2.Log4J2LoggingSystem