> -----Original Message-----
>
> How do I instruct each component to write to the correct logfile?
>
> -----Original Message-----
>
> There are multiple solutions, a simpler one of which is below:
>
> - create 2 loggers, each hooked with a FileAppender.
> - have your component log to those separate loggers.
>
> example config:
>
> log4j.rootLogger=DEBUG,
>
> log4j.logger.logger1=INFO,fileAppender1
> log4j.logger.logger2=INFO,fileAppender2

If I'm reading this right, a more class-oriented version of these lines
could be:

log4j.logger.com.mycompany.myclass=INFO,fileAppender1
log4j.logger.com.mycompany.myotherclass=INFO,fileAppender2

And you probably want to set:

log4j.additivity.com.mycompany.myclass=false
log4j.additivity.com.mycompany.myotherclass=false

Or am I missing something here?  ;)

-----------------------------------------------------------------
Colin MacDonald  |  Software Developer  |  Templar Corporation  |
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002


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

Reply via email to