http://jakarta.apache.org/log4j/docs/FAQ.html#filterByPriority
 
 
 
-----Original Message-----
From: jayan [mailto:jayan11@excite.com]
Sent: Friday, March 02, 2001 3:51 AM
To: log4j-user@jakarta.apache.org
Subject: Filtering messages

Jim , my aim is to segregate INFO messages to Info.txt,but it is logging all messages below INFO priority...
filtering of INFO,WARN,FATAL,ERROR  using  PropertyConfigurator is possible
or do i need to use DOMConfigurator and XML property file
 
My property file is this
 
log4j.category.com.idika.TestLogger=INFO, Second
log4j.additivity.com.idika.TestLogger=false
#log4j.appender.com.idika.TestLogger.Additivity=false
log4j.appender.Second=org.apache.log4j.FileAppender
log4j.appender.Second.File =Info.txt
log4j.appender.Second.layout=org.apache.log4j.PatternLayout
log4j.appender.Second.layout.ConversionPattern=%d %p %r [%t] %c - %m%n
 
log4j.appender.Second.filter=org.apache.log4j.varia.PriorityMatchFilter
log4j.appender.Second.filter.PriorityToMatch=INFO
log4j.appender.Second.filter.AcceptOnMatch=true