public class XmlConfiguration extends AbstractConfiguration implements Reconfigurable
Modifier and Type | Class and Description |
---|---|
private static class |
XmlConfiguration.ErrorType
The error that occurred.
|
private static class |
XmlConfiguration.Status
Status for recording errors.
|
AbstractFilterable.Builder<B extends AbstractFilterable.Builder<B>>
LifeCycle.State
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
LOG4J_XSD |
private org.w3c.dom.Element |
rootElement |
private java.lang.String |
schemaResource |
private java.util.List<XmlConfiguration.Status> |
status |
private boolean |
strict |
private static java.lang.String[] |
VERBOSE_CLASSES |
private static java.lang.String |
XINCLUDE_FIXUP_BASE_URIS |
private static java.lang.String |
XINCLUDE_FIXUP_LANGUAGE |
isShutdownHookEnabled, listeners, pluginManager, pluginPackages, rootNode, scriptManager, shutdownTimeoutMillis
DEFAULT_STOP_TIMEOUT, DEFAULT_STOP_TIMEUNIT, LOGGER
CONTEXT_PROPERTIES
Constructor and Description |
---|
XmlConfiguration(LoggerContext loggerContext,
ConfigurationSource configSource) |
Modifier and Type | Method and Description |
---|---|
private void |
constructHierarchy(Node node,
org.w3c.dom.Element element) |
private static void |
disableDtdProcessing(javax.xml.parsers.DocumentBuilderFactory factory) |
private static void |
enableXInclude(javax.xml.parsers.DocumentBuilderFactory factory)
Enables XInclude for the given DocumentBuilderFactory
|
private java.lang.String |
getType(org.w3c.dom.Element element) |
(package private) static javax.xml.parsers.DocumentBuilder |
newDocumentBuilder(boolean xIncludeAware)
Creates a new DocumentBuilder suitable for parsing a configuration file.
|
private java.util.Map<java.lang.String,java.lang.String> |
processAttributes(Node node,
org.w3c.dom.Element element) |
Configuration |
reconfigure() |
private static void |
setFeature(javax.xml.parsers.DocumentBuilderFactory factory,
java.lang.String featureName,
boolean value) |
void |
setup() |
java.lang.String |
toString() |
addAppender, addComponent, addListener, addLogger, addLoggerAppender, addLoggerFilter, createAdvertiser, createConfiguration, doConfigure, 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, initialize, initializeWatchers, isShutdownHookEnabled, preConfigure, removeAppender, removeListener, removeLogger, setAdvertiser, setLoggerAdditive, setName, setNanoClock, setPluginManager, setScriptManager, setToDefault, start, stop, toByteArray
addFilter, getFilter, getPropertyArray, hasFilter, isFiltered, removeFilter, stop
equalsImpl, getState, getStatusLogger, hashCodeImpl, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, stop, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addFilter, getFilter, hasFilter, isFiltered, removeFilter
private static final java.lang.String XINCLUDE_FIXUP_LANGUAGE
private static final java.lang.String XINCLUDE_FIXUP_BASE_URIS
private static final java.lang.String[] VERBOSE_CLASSES
private static final java.lang.String LOG4J_XSD
private final java.util.List<XmlConfiguration.Status> status
private org.w3c.dom.Element rootElement
private boolean strict
private java.lang.String schemaResource
public XmlConfiguration(LoggerContext loggerContext, ConfigurationSource configSource)
static javax.xml.parsers.DocumentBuilder newDocumentBuilder(boolean xIncludeAware) throws javax.xml.parsers.ParserConfigurationException
xIncludeAware
- enabled XIncludejavax.xml.parsers.ParserConfigurationException
private static void disableDtdProcessing(javax.xml.parsers.DocumentBuilderFactory factory)
private static void setFeature(javax.xml.parsers.DocumentBuilderFactory factory, java.lang.String featureName, boolean value)
private static void enableXInclude(javax.xml.parsers.DocumentBuilderFactory factory)
factory
- a DocumentBuilderFactorypublic void setup()
setup
in class AbstractConfiguration
public Configuration reconfigure()
reconfigure
in interface Reconfigurable
private void constructHierarchy(Node node, org.w3c.dom.Element element)
private java.lang.String getType(org.w3c.dom.Element element)
private java.util.Map<java.lang.String,java.lang.String> processAttributes(Node node, org.w3c.dom.Element element)
public java.lang.String toString()
toString
in class java.lang.Object