dcsimg
Can i make root logger to skip some package logging
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   aashu_jaidka
Posted On:   Saturday, May 23, 2009 05:04 AM

Hi All, I have two logger configurations a) rootLogger - R b) com.db - DB logger working fine, like its writing log msgs under com.db package in different file, level as mentioned in configuration. But rootLogger is also logging log messages of com.db package. but i want messages of com.db package only in DB log file not in rootLogger file. Is there any way to skip com.db log message from rootLogger to prevent replication in two log files. Thanks in advance this is my configuration log4j.rootLogger=ERROR, R log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=root.log log4j.appender.R.MaxFileSize=520000KB    More>>

Hi All,
I have two logger configurations
a) rootLogger - R
b) com.db - DB

logger working fine, like its writing log msgs under com.db package in different file, level as mentioned in configuration.

But rootLogger is also logging log messages of com.db package. but i want messages of com.db package only in DB log file not in rootLogger file.

Is there any way to skip com.db log message from rootLogger to prevent replication in two log files.

Thanks in advance


this is my configuration

log4j.rootLogger=ERROR, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=root.log
log4j.appender.R.MaxFileSize=520000KB
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d %p %t %c - %m%n

log4j.logger.com.iris.ion.mdr=INFO, MDR
log4j.appender.MDR=org.apache.log4j.RollingFileAppender
log4j.appender.MDR.File=./MDR.log
log4j.appender.MDR.MaxFileSize=5200000KB
log4j.appender.MDR.layout=org.apache.log4j.PatternLayout
log4j.appender.MDR.layout.ConversionPattern=%d %p %t %c - %m%n

   <<Less
About | Sitemap | Contact