Package org.apache.log4j.xml
Class DOMConfigurator
- java.lang.Object
-
- org.apache.log4j.xml.DOMConfigurator
-
public class DOMConfigurator extends java.lang.Object
Use 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
debug
attribute in thelog4j:configuration
element. 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 void
configure(java.lang.String fileName)
static void
configure(java.net.URL url)
static void
configure(org.w3c.dom.Element element)
static void
configureAndWatch(java.lang.String fileName)
static void
configureAndWatch(java.lang.String fileName, long delay)
void
doConfigure(java.io.InputStream inputStream, LoggerRepository repository)
void
doConfigure(java.io.Reader reader, LoggerRepository repository)
void
doConfigure(java.lang.String fileName, LoggerRepository repository)
void
doConfigure(java.net.URL url, LoggerRepository repository)
private void
doConfigure(ConfigurationSource source)
void
doConfigure(org.w3c.dom.Element element, LoggerRepository repository)
static java.lang.Object
parseElement(org.w3c.dom.Element element, java.util.Properties props, java.lang.Class expectedClass)
static void
setParameter(org.w3c.dom.Element elem, PropertySetter propSetter, java.util.Properties props)
static java.lang.String
subst(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)
-
-