The additivity flag should be set to appender and according to this debug
statements the additivity for appender A was null. 

Swami

> -----Original Message-----
> From: J IK [mailto:[EMAIL PROTECTED]]
> Sent: September 9, 2002 3:39 PM
> To: Log4J Users List
> Subject: RE: multiple categories same config file
> 
> 
> sorry that was a typo, categories were named as 'a' and 'b' and
> their appenders as 'aa' and 'bb'. 
> 
> I have the log4j log which goes like this:
> 
> log4j: Parsing for [root] with value=[DEBUG, Log2Console].
> log4j: Level token is [DEBUG].
> log4j: Category root set to DEBUG
> log4j: Parsing appender named "Log2Console".
> log4j: Parsing layout options for "Log2Console".
> log4j: Setting property [conversionPattern] to [[%d{dd MMM yyyy
> HH:mm:ss}]%c-%-5p: %m%n].
> log4j: End of parsing for "Log2Console".
> log4j: Setting property [target] to [System.err].
> log4j: Parsed "Log2Console" options.
> log4j: Parsing for [b] with value=[DEBUG, bb, Log2Console].
> log4j: Level token is [DEBUG].
> log4j: Category b set to DEBUG
> log4j: Parsing appender named "bb".
> log4j: Parsing layout options for "bb".
> log4j: Setting property [conversionPattern] to [[%d{dd MMM yyyy
> HH:mm:ss}]%c-%-5p: %m%n].
> log4j: End of parsing for "bb".
> log4j: Setting property [file] to [bb.log].
> log4j: Setting property [maxBackupIndex] to [10].
> log4j: Setting property [maxFileSize] to [1KB].
> log4j: setFile called: bb.log, true
> log4j: setFile ended
> log4j: Parsed "bb" options.
> log4j: Parsing appender named "Log2Console".
> log4j: Appender "Log2Console" was already parsed.
> log4j: Handling log4j.additivity.b=[null]
> log4j: Parsing for [a] with value=[DEBUG, aa, Log2Console].
> log4j: Level token is [DEBUG].
> log4j: Category a set to DEBUG
> log4j: Parsing appender named "aa".
> log4j: Parsing layout options for "aa".
> log4j: Setting property [conversionPattern] to [[%d{dd MMM yyyy
> HH:mm:ss}]%c-%-5p: %m%n].
> log4j: End of parsing for "aa".
> log4j: Setting property [maxBackupIndex] to [10].
> log4j: Setting property [maxFileSize] to [1KB].
> log4j: Setting property [file] to [aa.log].
> log4j: setFile called: aa.log, true
> log4j: setFile ended
> log4j: Parsed "aa" options.
> log4j: Parsing appender named "Log2Console".
> log4j: Appender "Log2Console" was already parsed.
> log4j: Handling log4j.additivity.a=[null]
> log4j: Finished configuring.
> [09 Sep 2002 14:34:58]a-DEBUG: Testing-1
> [09 Sep 2002 14:34:58]a-DEBUG: Testing-2
> 
> when i use the category 'a' the file bb.log is being created
> obviously locking it too.. 
> 
> Still fighting :-)....
> -Jik
> 
> --- Swami Iyer <[EMAIL PROTECTED]> wrote:
> > Can you try and rename your appender to be different than the
> > category name,
> > also try log4j.warn=true and log4j.debug=true, it will show
> > during the
> > startup what log files are going to be used and so on.
> > 
> > Swami
> > 
> > > -----Original Message-----
> > > From: J IK [mailto:[EMAIL PROTECTED]]
> > > Sent: September 9, 2002 3:12 PM
> > > To: Log4J Users List
> > > Subject: RE: multiple categories same config file
> > > 
> > > 
> > > made the changes still no help, when i start using the aa
> > > appender the bb.log file is getting locked. I should have
> > put
> > > this before, am using log4j version 1.2.5 and this is on
> > Windows
> > > 2000.
> > > 
> > > my config file now reads as follows:
> > > 
> > > log4j.rootCategory=DEBUG, Log2Console
> > > 
> > > # Log2Console is set to be a FileAppender sending
> > > # its output to System.err
> > > 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.aa=DEBUG, aa, Log2Console
> > > log4j.category.bb=DEBUG, bb, Log2Console
> > > log4j.category.notification=DEBUG, Notification
> > > 
> > > log4j.additivity.aa=false
> > > log4j.additivity.Notification=false
> > > 
> > > # aa properties
> > > log4j.appender.aa=org.apache.log4j.RollingFileAppender
> > > log4j.appender.aa.File=aa.log
> > > #log4j.appender.aa.MaxFileSize=10MB
> > > 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
> > > 
> > > # bb 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
> > > 
> > > Thankx much for all your help.
> > > -Jik
> > > 
> > > --- Swami Iyer <[EMAIL PROTECTED]> wrote:
> > > > Oops my bad, because of the additivity flag you should
> > specify
> > > > your console
> > > > as another appender in the category statement.
> > > > 
> > > > Swami
> > > > 
> > > > > -----Original Message-----
> > > > > From: Swami Iyer [mailto:[EMAIL PROTECTED]]
> > > > > Sent: September 9, 2002 2:54 PM
> > > > > To: 'Log4J Users List'
> > > > > Subject: RE: multiple categories same config file
> > > > > 
> > > > > 
> > > > > Your root category says that WARN will appear in the
> > > > console, 
> > > > > hence your
> > > > > debugging may not appear in the console.
> > > > > 
> > > > > Swami
> > > > > 
> > > > > > -----Original Message-----
> > > > > > From: J IK [mailto:[EMAIL PROTECTED]]
> > > > > > Sent: September 9, 2002 2:15 PM
> > > > > > To: Log4J Users List
> > > > > > Subject: RE: multiple categories same config file
> > > > > > 
> > > > > > 
> > > > > > 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]>
> > > > 
> > > > --
> > > > 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]>
> > > 
> > 
> > --
> > 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]>
> 

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

Reply via email to