NonStop Servlets for JavaServer Pages (5.0) System Administrator's Guide
Logs and Error Conditions
NonStop Servlets for JavaServer Pages (NSJSP) System Administrator’s Guide—525644-002
6-4
Status Information
9. Optionally, you can add <Logger> tags with the
com.tandem.servlet.catalina.logger.NSJSPFileLogger to your
context.xml configuration file.
10. Restart the NSJSP container.
Status Information
NSJSP processes report the following kinds of information to the standard output file:
•
A message indicating that the NSJSP process has started or failed to start.
•
Any message written to the standard output file by a servlet or JSP. For example,
the default init() method of a servlet may write a message reporting that it was
invoked.
Log Files Rollover
The rollover feature applies to log files created by NSJSP, except the servlet.log
and servlet_error.log files in the iTPWS_INSTALL_DIR/logs directory.
The NSJSP logger records all logged messages to disk file(s) in a specified directory
(the default is $NSJSP_HOME/logs). The actual filenames of the log files are created
from a configured prefix, the current date in YYYY-MM-DD format, and a configured
suffix. After midnight each night, the next logged message switches to a new log file
(based on the new date), without having to shut down SERVLET ServerClass to switch
logs.
Log Files Cleanup Script
Use the command-line utility nsjsp_cleanlogs as an aid in cleaning up log files
generated by the NSJSP container. This script is located in the
iTPWS_INSTALL_DIR/bin directory. The nsjsp_cleanlogs utility can be used as
part of a cron job or some other form of regularly scheduled administrative process.
By default, log files created by the NSJSP container are named using the specified
prefix, the current date, and the specified suffix in the following format: prefix.YYYY-
MM-DD.suffix. The nsjsp_cleanlogs script recursively searches the specified
directory for filenames in this format. Files that are older than the specified number of
days and that have an extension matching the specified file extension (suffix) are
deleted. Log file names in other formats are not checked or deleted.
This cleanup utility also provides an option to move log files to the specified directory
for safe-keeping, so you can decide later what to do with the saved log files.