Package org.apache.log4j.xml
Class DOMConfigurator
- java.lang.Object
-
- org.apache.log4j.xml.DOMConfigurator
-
public class DOMConfigurator extends java.lang.ObjectUse this class to initialize the log4j environment using a DOM tree.The DTD is specified in log4j.dtd.
Sometimes it is useful to see how log4j is reading configuration files. You can enable log4j internal logging by defining the log4j.debug variable on the java command line. Alternatively, set the
debugattribute in thelog4j:configurationelement. As in<log4j:configuration debug="true" xmlns:log4j="http://jakarta.apache.org/log4j/"> ... </log4j:configuration>
There are sample XML files included in the package.
- Since:
- 0.8.3
-
-
Constructor Summary
Constructors Constructor Description DOMConfigurator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidconfigure(java.lang.String fileName)static voidconfigure(java.net.URL url)static voidconfigure(org.w3c.dom.Element element)static voidconfigureAndWatch(java.lang.String fileName)static voidconfigureAndWatch(java.lang.String fileName, long delay)voiddoConfigure(java.io.InputStream inputStream, LoggerRepository repository)voiddoConfigure(java.io.Reader reader, LoggerRepository repository)voiddoConfigure(java.lang.String fileName, LoggerRepository repository)voiddoConfigure(java.net.URL url, LoggerRepository repository)private voiddoConfigure(ConfigurationSource source)voiddoConfigure(org.w3c.dom.Element element, LoggerRepository repository)static java.lang.ObjectparseElement(org.w3c.dom.Element element, java.util.Properties props, java.lang.Class expectedClass)static voidsetParameter(org.w3c.dom.Element elem, PropertySetter propSetter, java.util.Properties props)static java.lang.Stringsubst(java.lang.String value, java.util.Properties props)
-
-
-
Method Detail
-
configure
public static void configure(org.w3c.dom.Element element)
-
configure
public static void configure(java.lang.String fileName) throws javax.xml.parsers.FactoryConfigurationError- Throws:
javax.xml.parsers.FactoryConfigurationError
-
configure
public static void configure(java.net.URL url) throws javax.xml.parsers.FactoryConfigurationError- Throws:
javax.xml.parsers.FactoryConfigurationError
-
configureAndWatch
public static void configureAndWatch(java.lang.String fileName)
-
configureAndWatch
public static void configureAndWatch(java.lang.String fileName, long delay)
-
parseElement
public static java.lang.Object parseElement(org.w3c.dom.Element element, java.util.Properties props, java.lang.Class expectedClass)
-
setParameter
public static void setParameter(org.w3c.dom.Element elem, PropertySetter propSetter, java.util.Properties props)
-
subst
public static java.lang.String subst(java.lang.String value, java.util.Properties props)
-
doConfigure
private void doConfigure(ConfigurationSource source)
-
doConfigure
public void doConfigure(org.w3c.dom.Element element, LoggerRepository repository)
-
doConfigure
public void doConfigure(java.io.InputStream inputStream, LoggerRepository repository) throws javax.xml.parsers.FactoryConfigurationError- Throws:
javax.xml.parsers.FactoryConfigurationError
-
doConfigure
public void doConfigure(java.io.Reader reader, LoggerRepository repository) throws javax.xml.parsers.FactoryConfigurationError- Throws:
javax.xml.parsers.FactoryConfigurationError
-
doConfigure
public void doConfigure(java.lang.String fileName, LoggerRepository repository)
-
doConfigure
public void doConfigure(java.net.URL url, LoggerRepository repository)
-
-