SpringBootConfigurationFactory

@Plugin(name = "SpringBootConfigurationFactory", category = ConfigurationFactory.CATEGORY)
open class SpringBootConfigurationFactory : ConfigurationFactory

Spring Boot ConfigurationFactory that customizes Log4J2's default configuration to:

  1. Prevent logger warnings from being printed when the application first starts.
This factory is ordered last and is triggered by a log4j2.springboot classpath resource (which is bundled in this jar). If the Log4J2LoggingSystem is active, a DefaultConfiguration is returned with the expectation that the system will later re-initialize Log4J2 with the correct configuration file.

Author

Phillip Webb

Since

1.5.0

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val AUTHORIZATION_PROVIDER: String = "authorizationProvider"
Link copied to clipboard
open val authorizationProvider: AuthorizationProvider
Link copied to clipboard
val CATEGORY: String = "ConfigurationFactory"
Link copied to clipboard
val CONFIGURATION_FACTORY_PROPERTY: String = "log4j.configurationFactory"
Link copied to clipboard
val CONFIGURATION_FILE_PROPERTY: String = "log4j.configurationFile"
Link copied to clipboard
val LOG4J1_CONFIGURATION_FILE_PROPERTY: String = "log4j.configuration"
Link copied to clipboard
val LOG4J1_EXPERIMENTAL: String = "log4j1.compatibility"

Functions

Link copied to clipboard
open fun authorizationProvider(props: PropertiesUtil): AuthorizationProvider
Link copied to clipboard
open fun getConfiguration(loggerContext: LoggerContext, source: ConfigurationSource): Configuration
Link copied to clipboard
open fun getInstance(): ConfigurationFactory
Link copied to clipboard
open fun newConfigurationBuilder(): ConfigurationBuilder<BuiltConfiguration>
open fun <T : BuiltConfiguration?> newConfigurationBuilder(clazz: Class<T>): ConfigurationBuilder<T>
Link copied to clipboard
open fun removeConfigurationFactory(factory: ConfigurationFactory)
Link copied to clipboard
Link copied to clipboard
open fun setConfigurationFactory(factory: ConfigurationFactory)