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 Marc Carrion <mc...@opfactory.com> on 2001/12/19 18:31:36 UTC

correct inizialitation

  Is there any way to know that the configuration is well loaded
after doing DOMConfigurator.configure(filename)???

  Thanks,
         Marc


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: correct inizialitation

Posted by Thomas Tuft Muller <tt...@online.no>.
Marc,

There's probably a better method, but I test the config-file during the
build-process with a  JUnitTest class, which basically configures Log4j and
parses System.err for log4j:ERROR and log4j:WARN messages. I know; it's
really bad, but it works. BTW, I use it in conjunction with the XMLValidate
task in Ant. If a log4j.xml file passes both tests, then I assume it's OK.

I'm interested to know from the "gurus" what the proper way is as well.

Please find Log4jConfigJUnitTestclass attached.

--

Thomas


| -----Original Message-----
| From: Marc Carrion [mailto:mcarrion@opfactory.com]
| Sent: 19 December 2001 17:32
| To: log4j-user@jakarta.apache.org
| Subject: correct inizialitation
|
|
|   Is there any way to know that the configuration is well loaded
| after doing DOMConfigurator.configure(filename)???
|
|   Thanks,
|          Marc
|
|
| --
| To unsubscribe, e-mail:
| <ma...@jakarta.apache.org>
| For additional commands, e-mail:
| <ma...@jakarta.apache.org>
|
|


*************************************************************************
Copyright ERA Technology Ltd. 2001. (www.era.co.uk). All rights reserved. 
Confidential. No liability whatsoever is accepted for any loss or damage 
suffered as a result of accessing this message or any attachments.