logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Massimo Di Marco" <mdima...@logibro.com>
Subject Multiple appender with multiple log level.... please help...
Date Wed, 04 Apr 2001 15:14:54 GMT

I'm trying to have 2 appender with each appender a different log level and it seems like the
second appender log level overwrite the first one... Why? Is it possible to make the log level
not overwrite each other....

This is my properties file...

log4j.category.Generate                          = WARN, GENERATE1_Appender
log4j.category.Generate.TestLog                  = DEBUG,GENERATE2_Appender

log4j.appender.GENERATE1_Appender                = org.apache.log4j.RollingFileAppender
log4j.appender.GENERATE1_Appender.File           = System.out
log4j.appender.GENERATE1_Appender.layout         = org.apache.log4j.SimpleLayout

log4j.appender.GENERATE2_Appender                = org.apache.log4j.RollingFileAppender
log4j.appender.GENERATE2_Appender.File           = D:/Java/Src/Generate/generate.log
log4j.appender.GENERATE2_Appender.Append         = true
log4j.appender.GENERATE2_Appender.MaxFileSize    = 100kb
log4j.appender.GENERATE2_Appender.MaxBackupIndex = 5
log4j.appender.GENERATE2_Appender.layout         = org.apache.log4j.PatternLayout
log4j.appender.GENERATE2_Appender.layout.ConversionPattern = %d{dd MMM yyyy HH:mm:ss,SSS}
%-8.8p %l %L - %m\n

The first appender log all message of level DEBUG just like the second appender... why? Can
I avoid that?

Thanks for the help...

Massimo :)

Massimo Di Marco
Logibro Inc.
(514) 931-8356 Ext. 3114

View raw message