From: Ken Coar
This module is contained in the
Three directives are provided by this module:
+
Module mod_log_config
-
+mod_log_config.c
file,
and is compiled in by default in Apache 1.2. mod_log_config replaces
mod_log_common in Apache 1.2. Prior to version 1.2, mod_log_config was
an optional module. It provides for logging of the requests made to
the server, using the Common Log Format or a user-specified format.
+Summary
-
+TransferLog
to create a log file, LogFormat
to set a custom format,
and CustomLog
to define a log file and format in one go.
The TransferLog
and CustomLog
directives can
be used multiple times in each server to cause each request to be
logged to multiple files.
-Compatibility notes
@@ -45,6 +46,22 @@ HREF="mod_usertrack.html">mod_usertrack. The use of
CookieLog
is deprecated, and a CustomLog
should be defined to log user-tracking information instead.
+RefererIgnore
directive from
+mod_log_referer. The use
+of RefererIgnore
is deprecated, and should be
+replaced by combinations of
+SetEnvIf
directives
+and environment variable controlled CustomLog
+definitions.
+
Log File Formats
@@ -195,7 +212,9 @@ the user that starts the server.
@@ -223,8 +242,8 @@ the user that starts the server.
The CookieLog directive sets the filename for logging of cookies.
The filename is relative to the ServerRoot. This directive is included
-only for compatibility with mod_cookies, and is deprecated.
+only for compatibility with
+mod_cookies, and is deprecated.
@@ -242,7 +261,10 @@ HREF="mod_cookies.html">mod_cookies, and is deprecated.
HREF="directive-dict.html#Status"
REL="Help"
>Status: Base
-Compatibility: Nickname only available in Apache 1.3
+Compatibility: Nickname only available in Apache 1.3
or later
LogFormat
directive.
+
+The behaviour of this form of the CustomLog directive is almost
+identical to the standard CustomLog
+directive. The difference is that the 'env=
' clause controls
+whether a particular request will be logged in the specified file or
+not. 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 basis +using the mod_setenvif and/or +mod_rewrite modules. For example, +if you don't want to record requests for all GIF images on +your server in a separate logfile but not your main log, you +can use: +
++ SetEnvIf Request_URI \.gif$ gif-image + CustomLog gif-requests.log common env=gif-image + CustomLog nongif-requests.log common env=!gif-image ++
@@ -327,6 +401,55 @@ it doesn't actually apply the format and make it the default.
+The RefererIgnore directive adds to the list of strings to ignore in +Referer headers. If any of the strings in the list is contained in +the Referer header, then no referrer information will be logged for the +request. Example: +
++ RefererIgnore www.ncsa.uiuc.edu ++
+will avoid logging references from www.ncsa.uiuc.edu. +
+
+Note: All transaction logfiles
+(defined by CustomLog
or TransferLog
) in
+the same server scope as the RefererIgnore
(e.g.,
+in the same <VirtualHost>
container)
+are affected by
+this directive. If you want to control this behaviour on a
+per-logfile basis, you should use the
+conditional CustomLog
+capability.
+