On Jan 18, 2007, at 11:06 AM, James Stauffer wrote:

Could the configure method be changed to return a boolean indicating
sucess?  If someone detected that configuration failed, would log4j be
in an undefined state so that configuring with another file might not
produce the desired results?


In the strictxml project, I went out of my way to defer actually applying any configuration changes until processing was very likely to succeed, so that a parsing failure would leave the configuration unchanged. The approach can fail if things that are only checked in the activateOptions method, but that was the best I could do without touching log4j itself.


One way to detect config problems would be to run with -Dlog4j.debug
and capture and parse System.out info produced by log4j.


That is useful for analysis, but isn't helpful if your program is trying to appropriately respond to a configuration problem.






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to