Hi,

Yes, perhaps there are reasons to change it, but then help me understand how
to configure log4j in the following scenario.

We provide a log4.xml within our app's jar so that our application logs
messages during startup (say to file1 and console). We also let the users
specify a separate (external to our jars) log4j xml file to configure how
the app should log messages after the startup phase (say file2 and console).

With 1.2, this could be done by attaching the corresponding 2 appenders to
the <root> element in each of the config files. How would I achieve the same
behavior in 1.3? At this point, both file1 and file2 are growing, and every
message is showing twice on the console.

Thank you
Sergiu

-----Original Message-----
From: Ceki Gülcü [mailto:[EMAIL PROTECTED] 
Sent: February 23, 2007 2:49 PM
To: Log4J Users List; Log4J Users List
Subject: Re: Root logger appenders in log4j 1.3


Hello Jake et al,

The complete log4j manual is correct as far as log4j 1.0, 1.1, 1.2 are 
concerned. However, in log4j 1.3 the behavior was changed because:

1) it is not what a user would expect without reading the docs (surprise 
element)
2) very few people seemed to take advantage of the "pre 1.3" behaviour**

** The "pre 1.3" behavior was intended to support partial config files

The different behaviors should be transparent to the user as long as she 
does not do partial configs.

I hope this helps,

At 06:15 AM 2/23/2007, Jacob Kjome wrote:

>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

--
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for
Java.
http://logback.qos.ch


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



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

Reply via email to