You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Jim Tyrrell <JT...@appriss.com> on 2002/03/18 21:39:50 UTC

How do I write out to multiple log files from within the same pac kage.

Everyone,

All output from my test package only goes to the TestLogS.log file.  I
really want logging statements from SimpleThread to go to TestLogS.log and
log statements in JimSimpleThread to go to TestLogW.log.  Instead of all
statements going to TestLogS.log.

I search the history and this is what I thought I should do to make this
work, but I must be missing some simple.

BTW I am using Beta 3 and have not yet tested beta 4.

Thank You in advance.
Jim Tyrrell

log4j.rootLogger=debug, R

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %l = %m%n
log4j.appender.R.File=TestLog.log
log4j.appender.R.MaxFileSize=100KB
log4j.appender.R.MaxBackupIndex=5


log4j.logger.test.SimpleThread=debug, S
log4j.appender.S=org.apache.log4j.RollingFileAppender
log4j.appender.S.layout=org.apache.log4j.PatternLayout
log4j.appender.S.layout.ConversionPattern=%p %t %l = %m%n
log4j.appender.S.File=TestLogS.log
log4j.appender.S.MaxFileSize=100KB
log4j.appender.S.MaxBackupIndex=5


log4j.logger.test.JimSimpleThread=debug, W
log4j.appender.W=org.apache.log4j.RollingFileAppender
log4j.appender.W.layout=org.apache.log4j.PatternLayout
log4j.appender.W.layout.ConversionPattern=%p %t %l = %m%n
log4j.appender.W.File=TestLogW.log
log4j.appender.W.MaxFileSize=100KB
log4j.appender.W.MaxBackupIndex=5

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>