Log4J: 2 Appenders - one gets errors, other gets all (doesn't work)
I sent a message to the log4j-user mailing list this afternoon, but have not received a response - so hopefully someone can help me out. Here's the problem I'm having:
I have two appenders - a console and a file. I want all messages to go to the console and only <= error to go to the file. In my file appender, I have a filter to only get the error messages: <filter class="org.apache.log4j.varia.LevelRangeFilter"> <param name="LevelMax" value="ERROR" /> </filter> Then in <root> I have: <root> <level value="DEBUG"/> <appender-ref ref="CONSOLE"/> <appender-ref ref="FILE"/> </root> From the documentation I've read (i.e. http://tinyurl.com/meef), this *should* work. However, all messages get logged to both the console appender and the file appender.
Any advice is appreciated.
Posted by Yuri on September 07, 2003 at 04:25 AM MDT #
Posted by Matt Raible on September 07, 2003 at 04:38 PM MDT #
Posted by Fabrizio Giustina on September 08, 2003 at 08:21 AM MDT #
Posted by Tom Klaasen on September 08, 2003 at 09:05 AM MDT #
Posted by Matt Raible on September 08, 2003 at 06:56 PM MDT #
Posted by Unknown on September 09, 2003 at 01:37 PM MDT #