NonStop Servlets for JavaServer Pages (NSJSP) 6.0 System Administrator's Guide

Logging in NSJSP 6.0
NonStop Servlets for JavaServer Pages (NSJSP) 6.0 System Administrator’s Guide544548-004
6-9
LogFactory in NSJSP 6.0
of the maxFileSize attribute is greater than 0 and less than 10, the rollover of a log
file occurs only when the file size is 10 MB.
For example, if the value of the maxFileSize attribute is set to 8 in the
logging.properties file and the destination value is set to nsjsp.log, NSJSP
6.0 rolls over the content of the nsjsp.log file when the file size is 10 MB. If the
value of the maxFileSize attribute is greater than 10, the log file is rolled over only
when its size reaches the specified value of the maxFileSize attribute.
If the value of the maxFileSize attribute is equal to or less than zero, it is considered
as an invalid value and the size-based rollover feature is disabled. When the value of
the maxFileSize attribute is invalid, an error message is logged to STDERR.
When the size-based rollover feature is enabled, the rollover log files are saved with
the name specified by the destination attribute and are appended with the timestamp at
which the rollover occurs. For example, if NSJSP 6.0 rolls over the log file at time 31
Aug 2009, 02:00:30 and if the destination attribute value is nsjsp.log, the rollover
log file is named as nsjsp.log.2009.08.31.02.00.30.
To view the most recent log messages, open the nsjsp.log file. If the
archiveDirectory attribute is specified and if it points to a valid directory on the
NonStop operating system, the rollover log files are moved to the archive directory. If
the value of the archiveDirectory attribute points to an invalid directory location,
the rollover log files remain in the directory pointed by the destination and do not move
to the archive directory.
Timestamp-based Rollover of Log Files
The value of the datePattern attribute governs the timestamp-based rollover of log
files. The value of the datePattern attribute must follow the guidelines for date and
time pattern strings as specified in the documentation for the Java class
java.text.SimpleDateFormat at
http://java.sun.com/javase/6/docs/api/java/text/SimpleDateFormat.html.
The timestamp-based rollover feature causes the log file to roll over when the
timestamp value in the datePattern attribute is changed.
For example, when the value of the datePattern attribute is yyyy-MM-dd:HH and if
the current time is 31 Aug 2009, 02:30:45, the timestamp value is displayed as
2009-08-31:02, which is based on the value of the datePattern attribute. When the
time changes to 31 Aug 2009, 03:00:00, the timestamp value changes to
2009-08-31:03. The change in the timestamp triggers the rollover of log file.
When the timestamp-based rollover feature is enabled, the log file is created with the
name specified in the destination attribute and the timestamp (in the format of the
datePattern attribute) at which the server starts, is appended to it.
For example, if the server starts at time 28 Aug 2009, 14:20:45 and if the destination
value is set to nsjsp.log, the log file is created with the name
nsjsp.log.2009.08.28. When the time is changed to 29 Aug 2009, 00:00:00, the
time value changes to 2009-08-29, which is based on the value of the datePattern