NonStop Servlets for JavaServer Pages (NSJSP) 6.1 System Administrator's Guide
Logging in NSJSP
NonStop Servlets for JavaServer Pages (NSJSP) 6.1 System Administrator’s Guide—596210-006
5-7
Log Rollover
datePattern
Log rollover based on the datePattern attribute is called timestamp-based
rollover. The datePattern attribute enables you to configure the timestamp-
based rollover. You can set the log files to roll over at regular recurring intervals,
such as, after an hour, after a day, and after a week.
For information on how to configure the datePattern attribute, see Configuring
for Log Rollover Based on Timestamp on page 5-17.
archiveDirectory
The archiveDirectory attribute enables you to specify the location to which the
rolled over log files must be moved. Log files present in the specified location move
to the configured archiveDirectory when the threshold is exceeded.
For information on how to configure the archiveDirectory attribute, see
Configuring the
archiveDirectory Attribute on page 5-19.
Log Rollover Working
This section describes the following topics:
Note. The end of an hour is marked by the change in hour of the clock and not at the
completion of 60 minutes. For example, at 17:40 hours on August 28th, 2008, if you
configure the rollover of a log file to occur at the end of each hour, the first rollover occurs
at 18:00 hours when the hour of the clock changes and not at 18:40 hours. The
subsequent rollovers occur at 19:00 hours, 20:00 hours and so on.
The end of a day is marked by the change in date, which occurs at midnight, and not at the
end of 24 hours from the time the log file is created. For example, at 17:00 hours on
August 28
th
, 2008, if you configure the rollover of a log file to occur every day, the rollover
occurs at midnight, when the date changes to August 29
th
, 2008 and not at 17:00 hours on
August 29
th
, 2008.
Note. If the archiveDirectory attribute value is not specified, the rolled over log file
remains in the current directory. The current directory is the value of the destination
property.
Note.
The timestamp-based rollover is enabled by default. However, you can enable the size-
basec rollover.
Although you can archive the log files based on the maxFileSize and datePattern
attributes, only one of the two rollover attributes is supported at a time. If you set both
attributes in the logging.properties file, the size-based rollover attribute overrides the
timestamp-based rollover attribute. However, if the value of the maxFileSize attribute is
invalid, and the value of the datePattern attribute is valid, log files roll over on the basis
of the datePattern attribute value.
After configuring for log rollover, you must restart NSJSP for the changes to take effect.










