While working with DOMConfigurator a bit, I noticed that there is only a
single static configure method that takes a String argument, a local
file system path. I am under a mandate to not rely on local filesystems
but rather use ClassLoader resources, i.e. URL. There is a doConfigure
method that takes an URL, so I have added its corresponding static
configure(URL url) method which calls it. See attached cvs diff. Let
me know if any additional info is needed, etc. Thanx!
jeff
--
Jeffrey & Nikole Bonevich
Maxmillian Bonevich
Ann Arbor, Michigan
[EMAIL PROTECTED]
http://www.bonevich.com
Index: xml/DOMConfigurator.java
===================================================================
RCS file:
/home/cvspublic/jakarta-log4j/src/java/org/apache/log4j/xml/DOMConfigurator.java,v
retrieving revision 1.13
diff -u -r1.13 DOMConfigurator.java
--- xml/DOMConfigurator.java 2001/04/13 00:01:18 1.13
+++ xml/DOMConfigurator.java 2001/04/15 03:27:25
@@ -586,6 +586,15 @@
}
/**
+ This is the static version of {@link #doConfigure(URL, Hierarchy)}.x
+ */
+ static
+ public
+ void configure(URL url) throws FactoryConfigurationError {
+ new DOMConfigurator().doConfigure(url, Category.getDefaultHierarchy());
+ }
+
+ /**
Used internally to configure the log4j framework by parsing a DOM
tree of XML elements based on <a
href="doc-files/log4j.dtd">log4j.dtd</a>.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]