4.2.2 How to collect logs

This subsection describes how to collect the access log, error log, process ID log, and request log.

Organization of this subsection
(1) Access log
(2) Error log
(3) Process ID log
(4) request log
(5) Locations to which trace information is output

(1) Access log

(a) Access log in the default format

Specify the TransferLog directive to acquire the log.

The following is an example of access log in the default format:

Client host name[Figure]Identification information of the client[Figure]Client user name[Figure]Access time[Figure]"request line"[Figure]Status code[Figure]Number of sent bytes
Legend:
[Figure]: Space
(Output example)

172.17.40.30 - - [25/Dec/2000:16:23:59 +0900] "GET / HTTP/1.0" 200 3546

(b) Access log of custom format

Specify the CustomLog directive and collect the log. There are two methods to specify format:

(2) Error log

(a) Error message log

Specify the ErrorLog directive and collect the log. Specify the level of the errors to be collected with the LogLevel directive.

(b) The CGI script error log

Specify the ScriptLog directive and collect the CGI script error log.

(3) Process ID log

Specify the PidFile directive and collect the control process ID log.

(4) request log

Specify the HWSRequestLog and the HWSRequestLogType directives to collect the request log. The request log is a generic name that refers to module trace information, request trace information, and I/O filter trace information.

For details on module trace information, see 4.2.6 Collecting the module trace. For details on request trace information, see 4.2.7 Collecting request trace information. For details on I/O filter trace information, see 4.2.8 Collecting I/O filter trace information.

(5) Locations to which trace information is output

(a) Module trace information output destination

Module trace information is output to either the error log or the request log. The specification of directives determines which log is used for outputting module trace information. The following table lists the module trace information output destinations and conditions.

Table 4-2 Module trace information output destinations and conditions

Output destinationOutput conditions
Request logThe HWSRequestLog directive is specified, and either module-info or module-debug is specified in the HWSRequestLogType directive.
Error logThe HWSRequestLog directive is not specified, and either info or debug is specified in the LogLevel directive.

For details on module trace information, see 4.2.6 Collecting the module trace.

(b) Output destination of request trace information and I/O filter trace information

Request trace information and I/O filter trace information are output to the request log.

When the HWSRequestLog directive is specified and the HWSRequestLogType directive satisfies the output conditions, the trace information is output to the request log. For details on the output conditions of the HWSRequestLogType directive, see 4.2.7 Collecting request trace information and 4.2.8 Collecting I/O filter trace information.