That's an interesting quote. I have to admit that I haven't read the Log4j manual and that's new to me. In Log4j, reconfigurations are genrally not destructive. They are cumulative. It sounds like the manual is claiming that the ROOT logger is an exception to the rule.

Have you tried this with Log4j-1.2.xx? Do you get the same results or do you get the behavior described in the manual? It's certainly possible that this contract was broken in 1.3.

Ceki, Curt, anyone, can you shed any light on this topic? What's the expected behavior? Is the manual right, wrong, or just being misinterpreted?


Jake

At 11:05 AM 2/21/2007, you wrote:
>Hi,
>
>
>
>Our app, at start-up, configures using a 'bootstrap' log4j.boot.xml, and
>then at a later point it re-configures using another log4j.xml. Both xml
>files declare <root> logger with few appender references.
>
>
>
>With log4j 1.3 (alpha 8), we end up with messages going to all appenders
>configured for <root> logger in BOTH xml files, contradicting the quote
>below from the log4j manual. With log4j 1.2.*, messages get logged only to
>the appenders specified in the last log4j.xml.
>
>
>
>Is this a known issue or expected behaviour for log4j 1.3?
>
>
>
>Thank you
>
>
>
>QUOTE FROM MANUAL: "Similar to <logger> element, declaring a <root> element
>will have the effect of first closing and then detaching all its current
>appenders and only subsequently will referenced appenders, if any, will be
>added. In particular, if it has no appender references, then the root logger
>will lose all its appenders."
>
>


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

Reply via email to