Class Log4j2CloudConfigLoggingSystem
- java.lang.Object
-
- org.springframework.boot.logging.LoggingSystem
-
- org.springframework.boot.logging.AbstractLoggingSystem
-
- org.springframework.boot.logging.Slf4JLoggingSystem
-
- org.springframework.boot.logging.log4j2.Log4J2LoggingSystem
-
- org.apache.logging.log4j.spring.boot.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 StringENVIRONMENT_KEY
-
Constructor Summary
Constructors Constructor Description Log4j2CloudConfigLoggingSystem(ClassLoader loader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanUp()protected String[]getStandardConfigLocations()voidinitialize(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 voidloadConfiguration(String location, org.springframework.boot.logging.LogFile logFile)protected voidloadDefaults(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
-
-
-
-
Field Detail
-
ENVIRONMENT_KEY
public static final String ENVIRONMENT_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Log4j2CloudConfigLoggingSystem
public Log4j2CloudConfigLoggingSystem(ClassLoader loader)
-
-
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:
initializein classorg.springframework.boot.logging.log4j2.Log4J2LoggingSystem- Parameters:
initializationContext- The initialization context.configLocation- The configuration location.logFile- the log file.
-
getStandardConfigLocations
protected String[] getStandardConfigLocations()
- Overrides:
getStandardConfigLocationsin classorg.springframework.boot.logging.log4j2.Log4J2LoggingSystem
-
loadDefaults
protected void loadDefaults(org.springframework.boot.logging.LoggingInitializationContext initializationContext, org.springframework.boot.logging.LogFile logFile)
- Overrides:
loadDefaultsin classorg.springframework.boot.logging.log4j2.Log4J2LoggingSystem
-
loadConfiguration
protected void loadConfiguration(String location, org.springframework.boot.logging.LogFile logFile)
- Overrides:
loadConfigurationin classorg.springframework.boot.logging.log4j2.Log4J2LoggingSystem
-
cleanUp
public void cleanUp()
- Overrides:
cleanUpin classorg.springframework.boot.logging.log4j2.Log4J2LoggingSystem
-
-