Friday September 05, 2003
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 in Java at Sep 05 2003, 10:11:38 PM MDT 6 Comments
Matt Raible is a Web Architect who enjoys developing applications with open source technologies. Contact me for rates.
Search This Site
Recent Entries
- Happy Birthday Mom!
- 2008 - A Year in Review
- Portland Tech Meetup Tomorrow Night
- My "almost slept in a snow cave" Adventure with Clint Foster
- My Christmas Travel Adventure
- AppFuse Light converted to Maven modules, upgraded to Tapestry 5 and Stripes 1.5
- Dojo/Comet support in Java Web Frameworks
- Abbie is a Blue Skier!
- How I recovered data from my failed Linux box
- Costa Rica was Awesome!
Posted by Yuri on September 06, 2003 at 10:25 PM MDT #
Posted by Matt Raible on September 07, 2003 at 10:38 AM MDT #
Posted by Fabrizio Giustina on September 08, 2003 at 02:21 AM MDT #
Posted by Tom Klaasen on September 08, 2003 at 03:05 AM MDT #
Posted by Matt Raible on September 08, 2003 at 12:56 PM MDT #
Posted by Unknown on September 09, 2003 at 07:37 AM MDT #