This documentation was written because there doesn't seem to be a five-minute introduction anywhere on their site. I had to hit multiple web sites to compile this basic information.
Your log4j.xml must contain an appender that goes to a file and uses the XMLLayout. Here's a sample:
<appender name="chainsaw_log" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="blipfoot.log.xml"/>
<param name="Append" value="true"/>
<param name="Threshold" value="DEBUG"/>
<param name="MaxFileSize" value="100MB"/>
<param name="MaxBackupIndex" value="2"/>
<layout class="org.apache.log4j.xml.XMLLayout" />
</appender>
You can use Chainsaw 1.2, which ships inside the log4j distribution. Run it like this:java -classpath log4j-1.2.12.jar org.apache.log4j.chainsaw.Main
Or you can use Chainsaw 2, which is at this Java Web Start link.
Version 2 gives you pretty colors, I haven't yet figured out how to filter by logging level, which is pretty important. Version 1.2 couldn't make it any clearer: there's a level drop down placed prominently.
In Chainsaw V2: click the 'refine focus' drop down to filter on level.
There are other useful features: lots of ways to receive events via 'receivers', the ability to colorize, filter and search using the expression syntax, and the logger tree pane which allows you to quickly navigate/filter events.
There's a tutorial available from Chainsaw V2's 'Welcome' tab. Also, right-click in the event table or the expression box for more useful functionality.
Good luck!
Scott
Posted by: Scott | July 18, 2006 at 15:11
There's a tutorial available from Chainsaw V2's 'Welcome' tab. Also, right-click in the event table or the expression box for more useful functionality.
Posted by: chanel 2.55 | November 02, 2010 at 03:09
Romance: Many women long for the days when they and their husbands were courting.
Posted by: Nike Shox For Sale | February 17, 2011 at 19:50