Loggers inherit appenders unless they are told not to.  If you add an appender
to a logger and you want all logging for that logger to go only to the appender
you just added to it, you'll have to set additivity="false" to this logger.

log4j.additivity.com.mycompany.MyClass=false
OR
<logger name="com.mycompany.MyClass" additivity="false">
....
</logger>


Jake

Quoting DECAFFMEYER MATHIEU <[EMAIL PROTECTED]>:

>
> Hi,
>
> I have a main log file where all the logs are stored of the application.
> But I have a block of instructions in my application and I want the logs
> of this code to be stored in another log file.
>
> So I execute this :
>
> PropertyConfigurator.configure(...);
>
> It works ok, but the logs are now stored in both file :
> the file I specified in the configure method above
> the main log file
>
> Can anyone help ?
>
> Thank u.
> __________________________________
>
>    Matt
>
>
>
> ============================================
> Internet communications are not secure and therefore Fortis Banque Luxembourg
> S.A. does not accept legal responsibility for the contents of this message.
> The information contained in this e-mail is confidential and may be legally
> privileged. It is intended solely for the addressee. If you are not the
> intended recipient, any disclosure, copying, distribution or any action taken
> or omitted to be taken in reliance on it, is prohibited and may be unlawful.
> Nothing in the message is capable or intended to create any legally binding
> obligations on either party and it is not intended to provide legal advice.
> ============================================
>
>




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

Reply via email to