Log module

Request Logging in Definable Logging Format

Overview
The log module is used to log client requests in a user configurable format. DLF stands for Definable Logging Format. DLF logs may be shared by groups of Virtual Servers, and log files are automatically rotated every night at midnight.

Reference

Configuration

To enable logging you need to specify a location for the log file and a format string. The file location should be an absolute path. The format may be specified either by selection from a menu of standard logging formats or by specifying a custom format string. See separate discussions for the various standard formats and custom format strings.

First chose a logging format, click `Chose' to commit the change. You will be returned to the logging configuration page. Then specify a file name, click `Update' and the logging module will be configured.

Automatic Rotation
DLF log files are automatically rotated at midnight each night when in use by at least one Virtual Server. The logging information for the day is moved to filename.YYYYMMDD where filename is the filename of the DLF logfile and YY, MM, DD are year, month and day respectively. The original logfile is then emptied, and logging for the subsequent day continues in that file until the next rotation happens.

Sharing logfiles
Several Virtual Servers can be configured to log to the same file. This allows individual virtual hosts to be grouped logically together. For example, www.mycompany.com and www.mycompany.co.uk can both log to the same set of files.

Using group or single log files under UNIX operating systems has the added advantage of reducing the number of file descriptors in use. This is relevant when running a large number of Virtual Servers on a single machine, as the number of file descriptors is limited by the operating system.

Filename extensions
The log filename can contain special tags that are expanded before the file is opened. These tags are described below:

%h hostname of machine
%d domainname of machine
%p PID of zeus.web child
%c Child id of zeus.web child (0..num_children-1)

These extensions are useful when you are running a cluster of machines in a web server farm, with all files being logged to a network fileserver. By inserting the hostname in the filename, it allows logging to be centralized, while avoiding the locking issues involved with multiple machines attempting to log to the same filename. The log files can then be merged offline into a single file for later analysis.

Logging SSI subrequests
Normally all requests and Server Side Included (SSI) subrequests are logged. Turning off logging of SSI subrequests is useful when a lot of dynamic content on the site is produced via SSI subrequests, making it hard to find the actual requests in the log file.