Package org.frankframework.logging
Class FrankLogConfigurationFactory
java.lang.Object
org.apache.logging.log4j.core.config.builder.api.ConfigurationBuilderFactory
org.apache.logging.log4j.core.config.ConfigurationFactory
org.frankframework.logging.FrankLogConfigurationFactory
public class FrankLogConfigurationFactory
extends org.apache.logging.log4j.core.config.ConfigurationFactory
This ConfigurationFactory is loaded after the log4j2.properties file has been initialized.
Both Configurations are then combined via a CompositeConfiguration
NOTE:
The use of Lombok is not allowed, this may break annotation processing! This is required now that package scanning is no longer allowed.
Should not depend on any (util) classes that use a logger!
- Author:
- Murat Kaan Meral, Niels Meijer
-
Field Summary
Fields inherited from class org.apache.logging.log4j.core.config.ConfigurationFactory
AUTHORIZATION_PROVIDER, CATEGORY, CONFIGURATION_FACTORY_PROPERTY, CONFIGURATION_FILE_PROPERTY, DEFAULT_PREFIX, LOG4J1_CONFIGURATION_FILE_PROPERTY, LOG4J1_EXPERIMENTAL, LOG4J1_VERSION, LOG4J2_VERSION, LOGGER, substitutor, TEST_PREFIX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.logging.log4j.core.config.Configuration
getConfiguration
(org.apache.logging.log4j.core.LoggerContext loggerContext, org.apache.logging.log4j.core.config.ConfigurationSource source) Also called when refreshed (see UpdateLogDefinitions)protected String[]
populateThreadContextProperties
(String configuration, Properties properties) static String
readLog4jConfiguration
(InputStream stream) Methods inherited from class org.apache.logging.log4j.core.config.ConfigurationFactory
authorizationProvider, getAuthorizationProvider, getConfiguration, getConfiguration, getDefaultPrefix, getInputFromString, getInstance, getTestPrefix, getVersion, isActive, removeConfigurationFactory, resetConfigurationFactory, setConfigurationFactory
Methods inherited from class org.apache.logging.log4j.core.config.builder.api.ConfigurationBuilderFactory
newConfigurationBuilder, newConfigurationBuilder
-
Field Details
-
LOG_PREFIX
- See Also:
-
LOG4J_PROPERTY_REGEX
- See Also:
-
-
Constructor Details
-
FrankLogConfigurationFactory
public FrankLogConfigurationFactory()
-
-
Method Details
-
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) Also called when refreshed (see UpdateLogDefinitions)- Specified by:
getConfiguration
in classorg.apache.logging.log4j.core.config.ConfigurationFactory
-
populateThreadContextProperties
@Nonnull protected static Map<String,String> populateThreadContextProperties(String configuration, Properties properties) -
readLog4jConfiguration
- Throws:
IOException
-