Revision 1 as of 2005-05-31 10:07:56
converted to 1.6 markup
|Deletions are marked like this.||Additions are marked like this.|
|Line 7:||Line 7:|
|See also [http://wiki.apache.org/cocoon/CocoonLog4J CocoonLog4J] and [http://logging.apache.org/log4j/docs/chainsaw.html Chainsaw homepage]||See also [[http://wiki.apache.org/cocoon/CocoonLog4J|CocoonLog4J]] and [[http://logging.apache.org/log4j/docs/chainsaw.html|Chainsaw homepage]]|
|Line 12:||Line 12:|
|* you can launch Chainsaw with Web Start [http://logging.apache.org/log4j/docs/webstart/chainsaw/chainsawWebStart.jnlp here]||* you can launch Chainsaw with Web Start [[http://logging.apache.org/log4j/docs/webstart/chainsaw/chainsawWebStart.jnlp|here]]|
|Line 59:||Line 59:|
|* [http://wiki.apache.org/cocoon/ChainSaw Chainsaw in Cocoon Wiki]||* [[http://wiki.apache.org/cocoon/ChainSaw|Chainsaw in Cocoon Wiki]]|
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
Getting Chainsaw v2
you can launch Chainsaw with Web Start 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>
- 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"