Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Lenya Wiki" for change 
notification.

The following page has been changed by RenaudRichardet:
http://wiki.apache.org/lenya/HowToLoggingWithChainsaw

New page:
= Log Lenya with Chainsaw v2 =

Chainsaw is a powerful GUI-based Log viewer. It's a companion application to 
Log4j and seems to have replaced LogFactor5. Pros are:
* mature application, opensource, clean GUI, easy to install (web start)
* allows you to easily view the logs of a specific component of your webapp

See also [http://wiki.apache.org/cocoon/CocoonLog4J CocoonLog4J] and 
[http://logging.apache.org/log4j/docs/chainsaw.html Chainsaw homepage]

== Getting Chainsaw v2 ==

==== Web start ====
 * you can launch Chainsaw with Web Start 
[http://logging.apache.org/log4j/docs/webstart/chainsaw/chainsawWebStart.jnlp 
here]
 * at the startup popup, select "SocketReceiver" on "Port 4445"

==== Installing Chainsaw locally ====

 (not tested yet)

== Configuring Lenya (using SocketAppender) ==

 * Set this properties in WEB-INF/web.xml (it's already in there a couple of 
times, just make sure that it's at least uncommented in one place) :

{{{
<init-param>
  <param-name>logger-class</param-name>
<param-value>org.apache.avalon.excalibur.logger.Log4JLoggerManager</param-value>
</init-param>

<init-param>
  <param-name>log4j-config</param-name>
  <param-value>/WEB-INF/log4j.xconf</param-value>
</init-param>
}}}

 * In WEB-INF/log4j.xconf, comment out what's there and add:

{{{
<appender name="COCOON_DEFAULT"
class="org.apache.log4j.net.SocketAppender">
   <param name="RemoteHost" value="localhost" />
   <param name="Port" value="4445" />
</appender>

<root>
  <priority value ="debug" />
  <appender-ref ref="COCOON_DEFAULT" />
</root>
}}}

== Using Chainsaw ==

 * at the bottom of the window, a tab called "localhost.localdomain" should 
appear. click on it.
 * on the left side, you can select for which component of lenya you want to 
see the logs (right-click).
 * when you want an overview of your webapp, focus on the "Root Logger" and 
refine the focus on "info" (debug is way too verbose) 
 * when you analyse a specific component, focus on your component and refine 
the focus on "debug"

== Other Ressources: ==

 * [http://wiki.apache.org/cocoon/ChainSaw Chainsaw in Cocoon Wiki]
 * http://www.codeconsult.ch/bertrand/archives/000366.html
 * http://logging.apache.org/log4j/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to