logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin D. Carbis" <kcar...@marcole.com>
Subject DOMCOnfigurator parses twice?
Date Tue, 17 Feb 2004 21:32:21 GMT
In order to load my own log message dictionary I am doing a little walk down
the classpath myself.  If and when I find the log4j.xml and my own .xml
dictionary files I do the following on the directory:

	public boolean configure( String dir ) {

		String s = dir + pathSep + "log4j.xml" ;
		DOMConfigurator.configure( s );

			// load the message dictionary.
		LogMessageDictionary.getInstance().init( dir ) ;
		initialized = true ;
		return true ;

In my test case, the log4j.xml file is in ...\WEB-INF\classes and is found.
The DOMConfigurator.configure(s) line seems to cause the file to be parsed
twice, with errors the second time.

And, the close() method on my custom Appender is getting called during the

What have I done wrong?

Also, when bad things happen in the configurator it prints a stack trace,
but it doesn't throw anything or return anything thus if I'm not looking at
the console or the log I won't know that this happened.  Is there something
I can check?

Thanks in advance,

To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message