Log Cycling

Access and Error Log Cycling

The access and error log files are logs that can continue to grow with each document access. The Webulator/400's log cycling capabilities give the WebMaster the ability to schedule the date and time of when the contents of the current access and error log files are copied to new files and the current files are cleared out. With this capability you have the ability to automatically save access and error data to separate files for a fixed period of time. This is particularly useful if you are using the access log file to determine the number of times a document is accessed.

The naming algorithm used to determine the filename of the log file containing the historical data is as follows:

QDLS file system
The QDLS file system only supports 8.3 (name.ext) names. Given this limitation the naming algorithm used to determine the name of the file containing the historical data is to leave the extension the same whether one exists or not. The eight character name will include three digits to uniquely identify the file. The digits will be concatenated to the name of the current log file. If there is not enough room within the eight character limit, the current name will be truncated to include the three digits. The count will start at '000' incrementing each time to find the next highest available number wrapping back to '000' when '999' is reached.
QSYS file system
The QSYS file system only supports ten characters within the file name (object name). The ten character name will include three digits to uniquely identify the file. The digits will be concatenated to the name of the current log file. If there is not enough room within the ten character limit, the current name will be truncated to include the three digits. The count will start at '000' incrementing each time to find the next highest available number wrapping back to '000' when '999' is reached.
All other file systems which support extended file names (e.g. the "Root" file system)
These file systems allow more flexibility when it comes to expanding names to include additional characters. Three digits will be inserted into the name prior to the last extension. These three digits will be preceded by the '.' character and (e.g. access.log becomes access.000.log). If the file name does not have any extensions (no '.' included within the file) then the three digits will be appended to the file name preceded by the '.' character (e.g. access becomes access.000).

In addition to being able to save this information in separate files, you are able to specify how many of these files you want kept within the directory. The server will search the directory for all files which match the same naming algorithm described above. All files, which are determined to be previous log files created by the log cycling algorithm, are included in the count of previous files. When the number of files determined to be previous log files exceeds the configured value for the maximum number of cycled log files to keep within the directory, the earliest log files are removed. The earliest log files are determined by the three digit numbers included within their names not by their dates. Therefore if you wish to keep a particular log file you must copy, move, or rename the file in order to ensure that it is not automatically deleted by the Webulator/400 product during log cycling.

Cycled Log File Security Considerations

The Server User Profile requires Read, Write and eXecute authorities for all directories containing any of the logs. Note that the authorities assigned to all log files created, including cycled log files will only include the *PUBLIC authorities and the authorities of the server user profile. The *PUBLIC authority will be assigned the same as the library or directory where the log file exists. Any special authorities granted or denied to other users will not be carried forward from the library or directory. This limitation exists because the server user profile should, in most cases, have limited authorities for security reasons.