Return-Path:
The format argument to the The characteristics of the request itself are logged by
placing "%" directives in the format string, which are replaced
- in the log file by the values as follows:LogFormat
and
CustomLog
directives is a string. This string is
- logged to the log file for each request. It can contain literal
- characters copied into the log files and the c-type control
+ used to log each request to the log file. It can contain literal
+ characters copied into the log files and the C-style control
characters "\n" and "\t" to represent new-lines and tabs.
Literal quotes and back-slashes should be escaped with
back-slashes.
%...a: Remote IP-address %...A: Local IP-address %...B: Bytes sent, excluding HTTP headers. %...b: Bytes sent, excluding HTTP headers. In CLF format i.e. a '-' rather than a 0 when no bytes are sent. -%...c: Connection status when response is completed. +%...c: Connection status when response was completed. 'X' = connection aborted before the response completed. '+' = connection may be kept alive after the response is sent. '-' = connection will be closed after the response is sent. @@ -122,7 +122,7 @@ "%!200,304,302{Referer}i" logs Referer: on all requests which did not return some sort of normal status. -Note that in versions previous to 1.3.25 no escaping has been performed +
Note that in versions previous to 1.3.25 no escaping was performed on the strings from
+ C-style notation (%...r
,%...i
and%...o
. This was mainly to comply with the requirements of the Common Log Format. This implied that clients could insert control @@ -135,7 +135,7 @@ the hexadecimal representation of the raw byte. Exceptions from this rule are"
and\
which are escaped by prepending a backslash, and all whitespace characters that are written in their - C-notation (\n
,\t
etc).\n
,\t
, etc).Some commonly used log format strings are:
@@ -185,7 +185,7 @@
CookieLog
@@ -200,7 +200,7 @@
href="../env.html">environment variables. That is, you
can control whether a request should be logged or not based
upon whether an arbitrary environment variable is defined or
- not. This is configurable on a per-logfile
+ not. This is configurable on a per-logfile
basis.The first argument, which specifies the location to which - the logs will be written, can take on one of the following two + the logs will be written, can take one of the following two types of values:
|
", 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 under the user who started httpd. This will be
+ 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 third argument is optional and allows the decision on - whether or not to log a particular request to be based on the +
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.
Environment variables can be set on a per-request +
Environment variables can be set on a per-request
basis using the mod_setenvif
and/or mod_rewrite modules. For
example, if you want to record requests for all GIF
@@ -347,7 +347,7 @@
this directive sets the log format which will be used by logs
specified in subsequent TransferLog
directives. The single argument can specify an explicit
- format as discussed in custom log
+ format as discussed in the custom log
formats section above. Alternatively, it can use a
nickname to refer to a log format defined in a
previous LogFormat
directive as described
@@ -363,7 +363,7 @@
else -- that is, it only defines the
nickname, it doesn't actually apply the format and make it the
default. Therefore, it will not affect subsequent TransferLog directives.
For example:
@@ -392,8 +392,8 @@ exception that it does not allow the log format to be specified explicitly or for conditional logging of requests. Instead, the log format is determined by the most recently specified LogFormat directive (that does not define - a nickname). Common Log Format is used if no other format has + href="#logformat">LogFormat directive that does not define + a nickname. Common Log Format is used if no other format has been specified.Example: