mod_log_config.html revision a902ab8fc247cc32dda1479e9c069f59aa22a6e1
03831d35f7499c87d51205817c93e9a8d42c4baestevel<!--#include virtual="header.html" -->
03831d35f7499c87d51205817c93e9a8d42c4baestevelThis module is contained in the <code>mod_log_config.c</code> file,
03831d35f7499c87d51205817c93e9a8d42c4baesteveland is compiled in by default in Apache 1.2. mod_log_config replaces
03831d35f7499c87d51205817c93e9a8d42c4baestevelmod_log_common in Apache 1.2. Prior to version 1.2, mod_log_config was
03831d35f7499c87d51205817c93e9a8d42c4baestevelan optional module. It provides for logging of the requests made to
03831d35f7499c87d51205817c93e9a8d42c4baestevelthe server, using the Common Log Format or a user-specified format.
03831d35f7499c87d51205817c93e9a8d42c4baestevelThree directives are provided by this module: <code>TransferLog</code>
03831d35f7499c87d51205817c93e9a8d42c4baestevelto create a log file, <code>LogFormat</code> to set a custom format,
03831d35f7499c87d51205817c93e9a8d42c4baesteveland <code>CustomLog</code> to define a log file and format in one go.
03831d35f7499c87d51205817c93e9a8d42c4baestevelThe <code>TransferLog</code> and <code>CustomLog</code> directives can
24fe0b3bf671e123467ce1df0b67cadd3614c8e4jmcpbe use multiple times in each server to cause each request to be
03831d35f7499c87d51205817c93e9a8d42c4baestevellogged to multiple files.
03831d35f7499c87d51205817c93e9a8d42c4baestevel<li>This module is based on mod_log_config distributed with
03831d35f7499c87d51205817c93e9a8d42c4baestevelprevious Apache releases, now updated to handle multiple logs.
03831d35f7499c87d51205817c93e9a8d42c4baestevelThere is now no need to re-configure Apache to get use
03831d35f7499c87d51205817c93e9a8d42c4baestevelconfiguration log formats.
03831d35f7499c87d51205817c93e9a8d42c4baestevel<li>The module also implements the <code>CookieLog</code> directive,
03831d35f7499c87d51205817c93e9a8d42c4baestevelused to log user-tracking information created by <a
03831d35f7499c87d51205817c93e9a8d42c4baestevelhref="mod_usertrack.html">mod_usertrack</a>. The use of
03831d35f7499c87d51205817c93e9a8d42c4baestevel<code>CookieLog</code> is deprecated, and a <code>CustomLog</code>
03831d35f7499c87d51205817c93e9a8d42c4baestevelshould be defined to log user-tracking information instead.
03831d35f7499c87d51205817c93e9a8d42c4baestevelUnless told otherwise with <tt>LogFormat</tt> the log files created by
03831d35f7499c87d51205817c93e9a8d42c4baestevel<tt>TransferLog</tt> will be in standard "Common Log Format"
03831d35f7499c87d51205817c93e9a8d42c4baestevel(CLF). The contents of each line in a CLF file are explained
03831d35f7499c87d51205817c93e9a8d42c4baestevelbelow. Alternatively, the log file can be customised (and if multiple
03831d35f7499c87d51205817c93e9a8d42c4baestevellog files are used, each can have a different format). Custom formats
03831d35f7499c87d51205817c93e9a8d42c4baestevelare set with <code>LogFormat</code> and <code>CustomLog</code>.
03831d35f7499c87d51205817c93e9a8d42c4baestevelThe Common Log Format (CLF) file contains a separate line for each
03831d35f7499c87d51205817c93e9a8d42c4baestevelrequest. A line is composed of several tokens separated by spaces:
03831d35f7499c87d51205817c93e9a8d42c4baestevel<blockquote>
03831d35f7499c87d51205817c93e9a8d42c4baestevelhost ident authuser date request status bytes
03831d35f7499c87d51205817c93e9a8d42c4baestevel</blockquote>
03831d35f7499c87d51205817c93e9a8d42c4baestevelIf a token does not have a value then it is represented by a hyphen (-).
03831d35f7499c87d51205817c93e9a8d42c4baestevelThe meanings and values of these tokens are as follows:
48bc00d6814e04ff3edb32cafe7d1bc580baff68jmcp<dd>The fully-qualified domain name of the client, or its IP number if the
03831d35f7499c87d51205817c93e9a8d42c4baestevelname is not available.
03831d35f7499c87d51205817c93e9a8d42c4baestevel<dd>If <A HREF="core.html#identitycheck">IdentityCheck</A> is enabled and the
03831d35f7499c87d51205817c93e9a8d42c4baestevelclient machine runs identd, then this is the identity information reported
%...b: Bytes sent.
%...f: Filename
%...h: Remote host
%...l: Remote logname (from identd, if supplied)
%...p: The port request was received on
%...P: The process ID of the child that serviced the request
%...r: First line of request
%...s: Status. For requests that got internally redirected,
%...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
%...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" -->