Debug logging

From Resin 3.0

Revision as of 20:13, 28 March 2006 by Sam (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Resin provides a number of diagnostic messages using the JDK logging facility. Full debug logging is enabled with an empty name (meaning match all names) and a level of 'finer'. Since this will produce many messages, it is useful to put the messages in a a seperate file.

Contents

Full debug logging of the server and all applications

To the console

<resin>
  ...
  <log name="" level="finer" path="stdout:"/>
  ...
</resin>

To a file

The following configuration creates a debug log for each day, and when a problem occurs the debug log is used to help find out what the problem is. Since the <log> entry is in resin.conf, the log will capture messages from the server itself and all applications. The resulting log messages are found in the file $RESIN_HOME/log/debug.log.

Full debug logging of the server to $RESIN_HOME/log/debug.log

<resin>
  ...
  <log name="" level="finer" path="log/debug.log"/>
  ...
</resin>

More specific areas can be targetted with appropriate values for name. The documentation for log provides a table of useful values for name.

Full debug logging of one web application

Often you can narrow down the logging requirements to a single web application. The log entry can be placed in web.xml and only log messages from that web application will get logged.

To the console

<web-app>
  ...
  <log name="" level="finer" path="stdout:"/>
  ...
</web-app>

To a file

The following configuration creates a debug log for each day in <web-app-root>/WEB-INF/work/debug.log.

Full debug logging of one application to <web-app-root>/WEB-INF/work/debug.log

<web-app>
  ...
  <log name="" level="finer" path="WEB-INF/work/debug.log"/>
  ...
</web-app>
Personal tools