Debug logging
From Resin 3.0
Line 4: | Line 4: | ||
== Full debug logging of the server and all applications == | == 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. | 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 | Full debug logging of the server to $RESIN_HOME/log/debug.log | ||
− | + | ||
<resin> | <resin> | ||
... | ... | ||
Line 15: | Line 25: | ||
</resin> | </resin> | ||
− | More specific areas can be targetted with appropriate values for name. The documentation for | + | 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 == | == Full debug logging of one web application == |
Revision as of 20:11, 28 March 2006
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 go to the log 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>