mod_log_config.html revision 4626d6d7ea118ca9df307c4a41a3c655a203a318
6a67d144095c31bbafed93cec1619590157335eajvergara<!--#include virtual="header.html" -->
6a67d144095c31bbafed93cec1619590157335eajvergaraThis module is contained in the <code>mod_log_config.c</code> file,
6a67d144095c31bbafed93cec1619590157335eajvergaraand is compiled in by default in Apache 1.2. mod_log_config replaces
6a67d144095c31bbafed93cec1619590157335eajvergaramod_log_common in Apache 1.2. Prior to version 1.2, mod_log_config was
6a67d144095c31bbafed93cec1619590157335eajvergaraan optional module. It provides for logging of the requests made to
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignacthe server, using the Common Log Format or a user-specified format.
6a67d144095c31bbafed93cec1619590157335eajvergaraThree directives are provided by this module: <code>TransferLog</code>
6a67d144095c31bbafed93cec1619590157335eajvergarato create a log file, <code>LogFormat</code> to set a custom format,
6a67d144095c31bbafed93cec1619590157335eajvergaraand <code>CustomLog</code> to define a log file and format in one go.
6a67d144095c31bbafed93cec1619590157335eajvergaraThe <code>TransferLog</code> and <code>CustomLog</code> directives can
6a67d144095c31bbafed93cec1619590157335eajvergarabe used multiple times in each server to cause each request to be
65e99be301d5a19db33f25841f671756e8dbb9b5ludovicplogged to multiple files.
6a67d144095c31bbafed93cec1619590157335eajvergara<li>This module is based on mod_log_config distributed with
68c6568488f064ce97a76169ef43a8f5f7b1c2f6jvergaraprevious Apache releases, now updated to handle multiple logs.
6a67d144095c31bbafed93cec1619590157335eajvergaraThere is now no need to re-configure Apache to use configuration log
6a67d144095c31bbafed93cec1619590157335eajvergara<li>The module also implements the <code>CookieLog</code> directive,
6a67d144095c31bbafed93cec1619590157335eajvergaraused to log user-tracking information created by <a
6a67d144095c31bbafed93cec1619590157335eajvergarahref="mod_usertrack.html">mod_usertrack</a>. The use of
6a67d144095c31bbafed93cec1619590157335eajvergara<code>CookieLog</code> is deprecated, and a <code>CustomLog</code>
6a67d144095c31bbafed93cec1619590157335eajvergarashould be defined to log user-tracking information instead.
6a67d144095c31bbafed93cec1619590157335eajvergaraUnless told otherwise with <tt>LogFormat</tt> the log files created by
6a67d144095c31bbafed93cec1619590157335eajvergara<tt>TransferLog</tt> will be in standard "Common Log Format"
2401d3c2af505789c7c3b860a43e973f27731243jvergara(CLF). The contents of each line in a CLF file are explained
2401d3c2af505789c7c3b860a43e973f27731243jvergarabelow. Alternatively, the log file can be customized (and if multiple
2401d3c2af505789c7c3b860a43e973f27731243jvergaralog files are used, each can have a different format). Custom formats
2401d3c2af505789c7c3b860a43e973f27731243jvergaraare set with <code>LogFormat</code> and <code>CustomLog</code>.
6a67d144095c31bbafed93cec1619590157335eajvergaraThe Common Log Format (CLF) file contains a separate line for each
6a67d144095c31bbafed93cec1619590157335eajvergararequest. A line is composed of several tokens separated by spaces:
6a67d144095c31bbafed93cec1619590157335eajvergara<blockquote>
c9d984b0d2c0fda320e79eb3868dd6fbeb1ffa34jvergarahost ident authuser date request status bytes
2401d3c2af505789c7c3b860a43e973f27731243jvergara</blockquote>
2401d3c2af505789c7c3b860a43e973f27731243jvergaraIf a token does not have a value then it is represented by a hyphen (-).
2401d3c2af505789c7c3b860a43e973f27731243jvergaraThe meanings and values of these tokens are as follows:
68c6568488f064ce97a76169ef43a8f5f7b1c2f6jvergara<dd>The fully-qualified domain name of the client, or its IP number if the
68c6568488f064ce97a76169ef43a8f5f7b1c2f6jvergaraname is not available.
68c6568488f064ce97a76169ef43a8f5f7b1c2f6jvergara<dd>If <A HREF="core.html#identitycheck">IdentityCheck</A> is enabled and the
68c6568488f064ce97a76169ef43a8f5f7b1c2f6jvergaraclient machine runs identd, then this is the identity information reported
6a67d144095c31bbafed93cec1619590157335eajvergaraby the client.
%...b: Bytes sent, excluding HTTP headers.
%...f: Filename
%...h: Remote host
%...l: Remote logname (from identd, if supplied)
%...p: The port the request was served to
%...P: The process ID of the child that serviced the request.
%...r: First line of request
%...s: Status. For requests that got internally redirected, this
%...t: Time, in common log format time format
%...T: The time taken to serve the request, in seconds.
%...u: Remote user (from auth; may be bogus if return status (%s) is 401)
%...U: The URL path requested.
there is no escaping performed on the strings from %r, %...i and
%...o; some with long memories may remember that I thought this was
of `%..i', unless we URL-escape everything and break with CLF.
extending for format if desired (e.g. to add extra fields at the end).
<!--#include virtual="footer.html" -->