Good it works!
Thank you very much Jon, you saved me from insanity!
Bye
Francesco
----- Original Message -----
From: "Jon Skeet" <[EMAIL PROTECTED]>
To: "LOG4J Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, August 30, 2001 4:51 PM
Subject: RE: [beginner] How to send logs to different Appenders?
> Hi Jon.....so I have tried to modify my lo4j.properties of
> the basic example
> that comes with distribution.
> That's what I'd like to obtain:
>
> Class MyApp----------->Console Appender
> Class com.foo.Bar------>File Appender
>
> Here's how I have structured my log4j.properties:
>
> log4j.rootCategory=DEBUG,A1,A2
This is the problem - you're saying that *all* categories should be
appended to A1 *and* A2.
Change that to
log4j.rootCategory=DEBUG
and everything should be okay (I think :)
> log4j.category.MyApp=A1
> log4j.category.com.foo=A2
Ah - not quite. You need an INHERITED in the above (before the A1 or A2)
to say that the priority is the inherited one - otherwise it'll assume
DEBUG (I believe).
Jon
---------------------------------------------------------------------
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]