Debug logging
From Resin 3.0
Line 1: | Line 1: | ||
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. | 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. | ||
− | + | = Full debug logging of the server and all applications = | |
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. | ||
Line 9: | Line 9: | ||
<resin> | <resin> | ||
... | ... | ||
− | <log name= | + | <log name="" level="finer" path="log/debug.log"/> |
− | + | ||
− | + | ||
... | ... | ||
</resin> | </resin> | ||
Line 17: | Line 15: | ||
More specific areas can be targetted with appropriate values for name. The documentation for <log> provides a table of useful values for name. | 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 | + | 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. | 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 | Full debug logging of one application to <web-app-root>/WEB-INF/work/debug.log | ||
− | |||
<web-app> | <web-app> | ||
... | ... | ||
− | <log name= | + | <log name="" level="finer" path="WEB-INF/work/debug.log"/> |
− | + | ||
− | + | ||
... | ... | ||
</web-app> | </web-app> |
Revision as of 14:32, 13 February 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.
Full debug logging of the server and all applications
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>