blob: ec07d354da60037c3e474635615fd67191279555 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<TITLE>Chainsaw Tool</TITLE>
<P>Chainsaw is a GUI log viewer and filter for the log4j
package. By default it listens for <a
href="../spi/LoggingEvent.html">LoggingEvent</A> objects sent using
the <A href="../net/SocketAppender.html">SocketAppender</A> and
displays them in a table. The events can be filtered based on:</P>
<LI>Level </li>
<LI>Thread name</li>
<P>All the details for each event can be displayed by selecting
the event in the table.</P>
<P>Chainsaw also supports loading a events logged to a file using
the <A href="../xml/XMLLayout.html">XMLLayout</A> format. This
is great for analysing log files, and means you do not need to
keep Chainsaw running continously. It is easy to add support
for loading events from other sources like JDBC.</P>
<P>A picture is worth a thousand words: </P>
<P align=center><A
height="50%" alt="Screen shot of chainsaw"
<P>Finally, why is it called chainsaw?
Because it cuts your log (file) down to size. :-)
<P>Chainsaw is based on the Swing API which requires JDK 1.2 or later.</P>
<H2>Running chainsaw</H2>
<P>You need to include the <code>log4j.jar</code> in the classpath.
<P>The command line usage is:</P>
<PRE> java -D&lt;property&gt;=&lt;value&gt; org.apache.log4j.chainsaw.Main </PRE>
<P>The default behaviour of chainsaw can be changed by setting system properties
using the <CODE>-D&lt;property&gt;=&lt;value&gt;</CODE> arguments to java. The
following table describes what properties can be set:</P>
<TABLE cellSpacing=0 cellPadding=2 border=1>
<TD vAlign=top><B>Property</B></TD>
<TD vAlign=top><B>Description</B></TD></TR>
<TD vAlign=top>chainsaw.port</TD>
<TD vAlign=top>Indicates which port to listen for connections on. Defaults
to <SPAN class=default>"4445"</SPAN>.
<H2>Configuring Log4J</H2>
<P>You will need to configure log4j to send logging events to
Chainsaw. Here is a sample <CODE></CODE> file
for sending logging events to Chainsaw.</P>