org.apache.log4j.xml
Class DOMConfigurator
java.lang.Object
org.apache.log4j.config.ConfiguratorBase
org.apache.log4j.joran.JoranConfigurator
org.apache.log4j.xml.DOMConfigurator
- All Implemented Interfaces:
- Configurator
Deprecated. Replaced by the much more flexible JoranConfigurator
.
- public class DOMConfigurator
- extends JoranConfigurator
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 the
log4j: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
- Author:
- Christopher Taylor, Ceki Gülcü, Anders Kristensen
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DOMConfigurator
public DOMConfigurator()
- Deprecated.
configure
public static void configure(String file)
- Deprecated.
configure
public static void configure(URL url)
- Deprecated.
configure
public static void configure(Element element)
- Deprecated.
- Configure log4j using a
configuration
element.
- Parameters:
element
- element, may not be null.
doConfigure
public void doConfigure(Element element,
LoggerRepository repository)
- Deprecated.
- Configure by taking in an DOM element.
- Parameters:
element
- configuration element, may not be null.repository
- logger repository.
Copyright 2000-2005 Apache Software Foundation.