/lib/apache-log4j/site/apidocs/org/apache/log4j/chainsaw/package-summary.html

https://bitbucket.org/arkban/somersault · HTML · 260 lines · 198 code · 46 blank · 16 comment · 0 complexity · 484c868fd2ec6f27fa1e03e22beec1c5 MD5 · raw file

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--NewPage-->
  3. <HTML>
  4. <HEAD>
  5. <!-- Generated by javadoc (build 1.6.0_16) -->
  6. <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  7. <TITLE>
  8. org.apache.log4j.chainsaw (Apache Log4j 1.2.16 API)
  9. </TITLE>
  10. <META NAME="date" CONTENT="2010-03-30">
  11. <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
  12. <SCRIPT type="text/javascript">
  13. function windowTitle()
  14. {
  15. if (location.href.indexOf('is-external=true') == -1) {
  16. parent.document.title="org.apache.log4j.chainsaw (Apache Log4j 1.2.16 API)";
  17. }
  18. }
  19. </SCRIPT>
  20. <NOSCRIPT>
  21. </NOSCRIPT>
  22. </HEAD>
  23. <BODY BGCOLOR="white" onload="windowTitle();">
  24. <HR>
  25. <!-- ========= START OF TOP NAVBAR ======= -->
  26. <A NAME="navbar_top"><!-- --></A>
  27. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  28. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  29. <TR>
  30. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  31. <A NAME="navbar_top_firstrow"><!-- --></A>
  32. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  33. <TR ALIGN="center" VALIGN="top">
  34. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  35. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
  36. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
  37. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  38. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  39. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  40. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  41. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  42. </TR>
  43. </TABLE>
  44. </TD>
  45. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  46. </EM>
  47. </TD>
  48. </TR>
  49. <TR>
  50. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  51. &nbsp;<A HREF="../../../../org/apache/log4j/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp;
  52. &nbsp;<A HREF="../../../../org/apache/log4j/config/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
  53. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  54. <A HREF="../../../../index.html?org/apache/log4j/chainsaw/package-summary.html" target="_top"><B>FRAMES</B></A> &nbsp;
  55. &nbsp;<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  56. &nbsp;<SCRIPT type="text/javascript">
  57. <!--
  58. if(window==top) {
  59. document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  60. }
  61. //-->
  62. </SCRIPT>
  63. <NOSCRIPT>
  64. <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
  65. </NOSCRIPT>
  66. </FONT></TD>
  67. </TR>
  68. </TABLE>
  69. <A NAME="skip-navbar_top"></A>
  70. <!-- ========= END OF TOP NAVBAR ========= -->
  71. <HR>
  72. <H2>
  73. Package org.apache.log4j.chainsaw
  74. </H2>
  75. Chainsaw is a GUI log viewer and filter for the log4j
  76. package.
  77. <P>
  78. <B>See:</B>
  79. <BR>
  80. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#package_description"><B>Description</B></A>
  81. <P>
  82. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  83. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  84. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  85. <B>Class Summary</B></FONT></TH>
  86. </TR>
  87. <TR BGCOLOR="white" CLASS="TableRowColor">
  88. <TD WIDTH="15%"><B><A HREF="../../../../org/apache/log4j/chainsaw/Main.html" title="class in org.apache.log4j.chainsaw">Main</A></B></TD>
  89. <TD>The main application.</TD>
  90. </TR>
  91. </TABLE>
  92. &nbsp;
  93. <P>
  94. <A NAME="package_description"><!-- --></A><H2>
  95. Package org.apache.log4j.chainsaw Description
  96. </H2>
  97. <P>
  98. <P>Chainsaw is a GUI log viewer and filter for the log4j
  99. package. By default it listens for <a
  100. href="../spi/LoggingEvent.html">LoggingEvent</A> objects sent using
  101. the <A href="../net/SocketAppender.html">SocketAppender</A> and
  102. displays them in a table. The events can be filtered based on:</P>
  103. <UL>
  104. <LI>Level </li>
  105. <LI>Thread name</li>
  106. <LI>Logger</li>
  107. <LI>Message</li>
  108. <LI>NDC</LI>
  109. </UL>
  110. <P>All the details for each event can be displayed by selecting
  111. the event in the table.</P>
  112. <P>Chainsaw also supports loading a events logged to a file using
  113. the <A href="../xml/XMLLayout.html">XMLLayout</A> format. This
  114. is great for analysing log files, and means you do not need to
  115. keep Chainsaw running continously. It is easy to add support
  116. for loading events from other sources like JDBC.</P>
  117. <P>A picture is worth a thousand words: </P>
  118. <P align=center><A
  119. href="doc-files/screen_01.png"><IMG
  120. height="50%" alt="Screen shot of chainsaw"
  121. src="doc-files/screen_01.png"
  122. width="50%"></A>.</P>
  123. <P>Finally, why is it called chainsaw?
  124. Because it cuts your log (file) down to size. :-)
  125. </P>
  126. <H2>Requirements</H2>
  127. <P>Chainsaw is based on the Swing API which requires JDK 1.2 or later.</P>
  128. <H2>Running chainsaw</H2>
  129. <H3>Setup</H3>
  130. <P>You need to include the <code>log4j.jar</code> in the classpath.
  131. <H3>Usage</H3>
  132. <P>The command line usage is:</P>
  133. <PRE> java -D&lt;property&gt;=&lt;value&gt; org.apache.log4j.chainsaw.Main </PRE>
  134. <P>The default behaviour of chainsaw can be changed by setting system properties
  135. using the <CODE>-D&lt;property&gt;=&lt;value&gt;</CODE> arguments to java. The
  136. following table describes what properties can be set:</P>
  137. <TABLE cellSpacing=0 cellPadding=2 border=1>
  138. <TR>
  139. <TD vAlign=top><B>Property</B></TD>
  140. <TD vAlign=top><B>Description</B></TD></TR>
  141. <TR>
  142. <TD vAlign=top>chainsaw.port</TD>
  143. <TD vAlign=top>Indicates which port to listen for connections on. Defaults
  144. to <SPAN class=default>"4445"</SPAN>.
  145. </TD>
  146. </TR>
  147. </TBODY>
  148. </TABLE>
  149. <H2>Configuring Log4J</H2>
  150. <P>You will need to configure log4j to send logging events to
  151. Chainsaw. Here is a sample <CODE>log4j.properties</CODE> file
  152. for sending logging events to Chainsaw.</P>
  153. <PRE>
  154. log4j.rootLogger=DEBUG, CHAINSAW_CLIENT
  155. log4j.appender.CHAINSAW_CLIENT=org.apache.log4j.net.SocketAppender
  156. log4j.appender.CHAINSAW_CLIENT.RemoteHost=localhost
  157. log4j.appender.CHAINSAW_CLIENT.Port=4445
  158. log4j.appender.CHAINSAW_CLIENT.LocationInfo=true
  159. </PRE>
  160. <P>
  161. <P>
  162. <DL>
  163. </DL>
  164. <HR>
  165. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  166. <A NAME="navbar_bottom"><!-- --></A>
  167. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  168. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  169. <TR>
  170. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  171. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  172. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  173. <TR ALIGN="center" VALIGN="top">
  174. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  175. <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
  176. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</TD>
  177. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  178. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  179. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  180. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  181. <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  182. </TR>
  183. </TABLE>
  184. </TD>
  185. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  186. </EM>
  187. </TD>
  188. </TR>
  189. <TR>
  190. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  191. &nbsp;<A HREF="../../../../org/apache/log4j/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp;
  192. &nbsp;<A HREF="../../../../org/apache/log4j/config/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
  193. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  194. <A HREF="../../../../index.html?org/apache/log4j/chainsaw/package-summary.html" target="_top"><B>FRAMES</B></A> &nbsp;
  195. &nbsp;<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
  196. &nbsp;<SCRIPT type="text/javascript">
  197. <!--
  198. if(window==top) {
  199. document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  200. }
  201. //-->
  202. </SCRIPT>
  203. <NOSCRIPT>
  204. <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
  205. </NOSCRIPT>
  206. </FONT></TD>
  207. </TR>
  208. </TABLE>
  209. <A NAME="skip-navbar_bottom"></A>
  210. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  211. <HR>
  212. Copyright &#169; 1999-2010 <a href="http://www.apache.org">Apache Software Foundation</a>. All Rights Reserved.
  213. </BODY>
  214. </HTML>