Class SpringBootConfigurationFactory
- java.lang.Object
- org.apache.logging.log4j.core.config.builder.api.ConfigurationBuilderFactory
- org.apache.logging.log4j.core.config.ConfigurationFactory
- org.springframework.boot.logging.log4j2.SpringBootConfigurationFactory
@Plugin(name="SpringBootConfigurationFactory", category="ConfigurationFactory") public class SpringBootConfigurationFactory extends org.apache.logging.log4j.core.config.ConfigurationFactory
Spring BootConfigurationFactory
that customizes Log4J2's default configuration to:- Prevent logger warnings from being printed when the application first starts.
- Disable its shutdown hook
log4j2.springboot
classpath resource (which is bundled in this jar). If theLog4J2LoggingSystem
is active, a customDefaultConfiguration
is returned with the expectation that the system will later re-initialize Log4J2 with the correct configuration file.- Since:
- 1.5.0
Constructor Summary
Constructors Constructor Description SpringBootConfigurationFactory()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.logging.log4j.core.config.Configuration
getConfiguration(org.apache.logging.log4j.core.LoggerContext loggerContext, org.apache.logging.log4j.core.config.ConfigurationSource source)
protected String[]
getSupportedTypes()
Methods inherited from class org.apache.logging.log4j.core.config.ConfigurationFactory
getConfiguration, getConfiguration, getInputFromString, getInstance, isActive, removeConfigurationFactory, resetConfigurationFactory, setConfigurationFactory
Constructor Detail
SpringBootConfigurationFactory
public SpringBootConfigurationFactory()
Method Detail
getSupportedTypes
protected String[] getSupportedTypes()
- Specified by:
getSupportedTypes
in classorg.apache.logging.log4j.core.config.ConfigurationFactory
getConfiguration
public org.apache.logging.log4j.core.config.Configuration getConfiguration(org.apache.logging.log4j.core.LoggerContext loggerContext, org.apache.logging.log4j.core.config.ConfigurationSource source)
- Specified by:
getConfiguration
in classorg.apache.logging.log4j.core.config.ConfigurationFactory