httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roger B.A. Klorese" <>
Subject RE: [users@httpd] Syntax error on specifying separate log files
Date Thu, 15 Jan 2004 20:56:20 GMT
> I get this syntax error:  CustomLog takes two or three 
> arguments, a file
> name, a custom log format strong or format name and an optional "env-"
> clause
> Its weird because this is all I have in the file and its 
> almost verbatim
> what the example shows.

The docs say:

Syntax: CustomLog file|pipe format|nickname [env=[!]environment-variable]

The first argument, which specifies the location to which the logs will be
written, can take one of the following two types of values:

A filename, relative to the ServerRoot. 

The pipe character "|", followed by the path to a program to receive the log
information on its standard input. Security: if a program is used, then it
will be run as the user who started httpd. This will be root if the server
was started by root; be sure that the program is secure. 

The second argument specifies what will be written to the log file. It can
specify either a nickname defined by a previous LogFormat directive, or it
can be an explicit format string as described in the log formats section.

For example, the following two sets of directives have exactly the same

     # CustomLog with format nickname
     LogFormat "%h %l %u %t \"%r\" %>s %b" common
     CustomLog logs/access_log common

     # CustomLog with explicit format string
     CustomLog logs/access_log "%h %l %u %t \"%r\" %>s %b"

The third argument is optional and controls whether or not to log a
particular request based on the presence or absence of a particular variable
in the server environment. If the specified environment variable is set for
the request (or is not set, in the case of a 'env=!name' clause), then the
request will be logged.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message