Package org.apache.log4j.config
Class PropertiesConfiguration
- java.lang.Object
-
- org.apache.logging.log4j.core.AbstractLifeCycle
-
- org.apache.logging.log4j.core.filter.AbstractFilterable
-
- org.apache.logging.log4j.core.config.AbstractConfiguration
-
- org.apache.log4j.config.Log4j1Configuration
-
- org.apache.log4j.config.PropertiesConfiguration
-
- All Implemented Interfaces:
Configuration
,Reconfigurable
,Filterable
,LifeCycle
,LifeCycle2
public class PropertiesConfiguration extends Log4j1Configuration
Construct a configuration based on Log4j 1 properties.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.logging.log4j.core.filter.AbstractFilterable
AbstractFilterable.Builder<B extends AbstractFilterable.Builder<B>>
-
Nested classes/interfaces inherited from interface org.apache.logging.log4j.core.LifeCycle
LifeCycle.State
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEBUG_KEY
static long
DEFAULT_DELAY
-
Fields inherited from class org.apache.log4j.config.Log4j1Configuration
INHERITED, manager, MONITOR_INTERVAL, NULL, THRESHOLD_PARAM
-
Fields inherited from class org.apache.logging.log4j.core.config.AbstractConfiguration
isShutdownHookEnabled, listeners, pluginManager, pluginPackages, rootNode, scriptManager, shutdownTimeoutMillis
-
Fields inherited from class org.apache.logging.log4j.core.AbstractLifeCycle
DEFAULT_STOP_TIMEOUT, DEFAULT_STOP_TIMEUNIT, LOGGER
-
Fields inherited from interface org.apache.logging.log4j.core.config.Configuration
CONTEXT_PROPERTIES
-
-
Constructor Summary
Constructors Constructor Description PropertiesConfiguration(LoggerContext loggerContext, ConfigurationSource source, int monitorIntervalSeconds)
No argument constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addProperties(Object obj, String[] keys, Properties props, String prefix)
void
doConfigure()
Appender
parseAppender(Properties props, String appenderName)
Filter
parseAppenderFilters(Properties props, String filterPrefix, String appenderName)
ErrorHandler
parseErrorHandler(Properties props, String errorHandlerPrefix, String errorHandlerClass, Appender appender)
Layout
parseLayout(String layoutPrefix, String appenderName, Properties props)
-
Methods inherited from class org.apache.log4j.config.Log4j1Configuration
getBuilderManager, initialize, reconfigure
-
Methods inherited from class org.apache.logging.log4j.core.config.AbstractConfiguration
addAppender, addComponent, addListener, addLogger, addLoggerAppender, addLoggerFilter, createAdvertiser, createConfiguration, getAdvertiser, getAppender, getAppenders, getAsyncLoggerConfigDelegate, getComponent, getConfigurationSource, getCustomLevels, getDefaultStatus, getLogger, getLoggerConfig, getLoggerContext, getLoggers, getName, getNanoClock, getPluginManager, getPluginPackages, getProperties, getReliabilityStrategy, getRootLogger, getRootNode, getScheduler, getScriptManager, getShutdownTimeoutMillis, getStrSubstitutor, getWatchManager, initializeWatchers, isShutdownHookEnabled, preConfigure, removeAppender, removeListener, removeLogger, setAdvertiser, setLoggerAdditive, setName, setNanoClock, setPluginManager, setScriptManager, setToDefault, setup, start, stop, toByteArray
-
Methods inherited from class org.apache.logging.log4j.core.filter.AbstractFilterable
addFilter, getFilter, getPropertyArray, hasFilter, isFiltered, removeFilter, stop
-
Methods inherited from class org.apache.logging.log4j.core.AbstractLifeCycle
equalsImpl, getState, getStatusLogger, hashCodeImpl, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, stop, stop
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.logging.log4j.core.filter.Filterable
addFilter, getFilter, hasFilter, isFiltered, removeFilter
-
-
-
-
Field Detail
-
DEFAULT_DELAY
public static final long DEFAULT_DELAY
- See Also:
- Constant Field Values
-
DEBUG_KEY
public static final String DEBUG_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PropertiesConfiguration
public PropertiesConfiguration(LoggerContext loggerContext, ConfigurationSource source, int monitorIntervalSeconds)
No argument constructor.
-
-
Method Detail
-
doConfigure
public void doConfigure()
- Overrides:
doConfigure
in classAbstractConfiguration
-
parseAppender
public Appender parseAppender(Properties props, String appenderName)
-
parseLayout
public Layout parseLayout(String layoutPrefix, String appenderName, Properties props)
-
parseErrorHandler
public ErrorHandler parseErrorHandler(Properties props, String errorHandlerPrefix, String errorHandlerClass, Appender appender)
-
addProperties
public void addProperties(Object obj, String[] keys, Properties props, String prefix)
-
parseAppenderFilters
public Filter parseAppenderFilters(Properties props, String filterPrefix, String appenderName)
-
-