Hi Swami:

tried that too but it ended up not logging to the console, may
be I'm doing something wrong. this is what I added

log4j.additivity.a=false
log4j.additivity.b=false

to no avail. thankx for your pointers.
-Jik

--- Swami Iyer <[EMAIL PROTECTED]> wrote:
> I think using the additivity flag will avoid the log4j in
> opening both the
> files. 
> 
> Swami
> 
> > -----Original Message-----
> > From: J IK [mailto:[EMAIL PROTECTED]]
> > Sent: September 9, 2002 2:01 PM
> > To: [EMAIL PROTECTED]
> > Subject: multiple categories same config file
> > 
> > 
> > Hi All:
> > 
> > Following is my configuration file log4j.config:
> > 
> > log4j.rootCategory=WARN, Log2Console
> > 
> > log4j.appender.Log2Console=org.apache.log4j.ConsoleAppender
> > log4j.appender.Log2Console.Target=System.err
> >
>
log4j.appender.Log2Console.layout=org.apache.log4j.PatternLayout
> > log4j.appender.Log2Console.layout.ConversionPattern=[%d{dd
> MMM
> > yyyy HH:mm:ss}]%c-%-5p: %m%n
> > 
> > # Main component's properties
> > log4j.category.a=DEBUG, aa
> > log4j.category.b=DEBUG, bb
> > 
> > # SyncServer properties
> > log4j.appender.aa=org.apache.log4j.RollingFileAppender
> > log4j.appender.aa.File=aa.log
> > log4j.appender.aa.MaxFileSize=1KB
> > log4j.appender.aa.MaxBackupIndex=10
> > log4j.appender.aa.layout=org.apache.log4j.PatternLayout
> > log4j.appender.aa.layout.ConversionPattern=[%d{dd MMM yyyy
> > HH:mm:ss}]%c-%-5p: %m%n
> > 
> > # Admin properties
> > log4j.appender.bb=org.apache.log4j.RollingFileAppender
> > log4j.appender.bb.File=bb.log
> > log4j.appender.bb.MaxFileSize=1KB
> > log4j.appender.bb.MaxBackupIndex=10
> > log4j.appender.bb.layout=org.apache.log4j.PatternLayout
> > log4j.appender.bb.layout.ConversionPattern=[%d{dd MMM yyyy
> > HH:mm:ss}]%c-%-5p: %m%n
> > 
> > Now log4j is opening both the files aa.log and bb.log when i
> > just instantiate the 'aa' appender in a JVM. This is locking
> the
> > file 'bb.log' which is used by another application in a
> > different JVM. This is causing rollover problems etc.
> > 
> > I can eliminate the problem by using two different log4j
> config
> > files and by listing different appender properties in those
> two
> > but I want to avoid that and use a single config file for
> ease
> > of maintenance. Please let me know if/how I can do that.
> > 
> > Thanks in advance.
> > 
> > Regards,
> > -Jik
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Finance - Get real-time stock quotes
> > http://finance.yahoo.com
> > 
> > --
> > To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

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

Reply via email to