You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Kevin D. Carbis" <kc...@marcole.com> on 2004/02/17 22:32:21 UTC

DOMCOnfigurator parses twice?

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
configure.

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,
Kevin


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