mod_log_config.html revision 1b55e9e0a3c5fb40d9e46d3e6f711516a9a807fa
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<html xmlns="http://www.w3.org/TR/xhtml1/strict"><head><!--
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync This file is generated from xml source: DO NOT EDIT
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync--><title>mod_log_config - Apache HTTP Server</title><link href="/style/manual.css" type="text/css" rel="stylesheet"/></head><body><blockquote><div align="center"><img alt="[APACHE DOCUMENTATION]" src="/images/sub.gif"/><h3>Apache HTTP Server Version 2.0</h3></div><h1 align="center">Apache Module mod_log_config</h1><table cellspacing="1" cellpadding="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td valign="top"><span class="help">Description:</span></td><td><description>This module provides for logging of the requests
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncmade to the server, using the Common Log Format or a
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncuser-specified format.</description></td></tr><tr><td><a href="module-dict.html#Status" class="help">Status:</a></td><td>Base</td></tr><tr><td><a href="module-dict.html#ModuleIdentifier" class="help">Module Identifier:</a></td><td>log_config_module</td></tr><tr><td align="left" valign="top"><a href="module-dict.html#Compatibility" class="help">Compatibility:</a></td><td><compatibility></compatibility></td></tr></table></td></tr></table><h2>Summary</h2><summary>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <p>This module provides for flexible logging of client
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync requests. Logs are written in a customizable format, and may be
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync written directly to a file, or to an external program.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Conditional logging is provided so that individual requests may
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync be included or excluded from the logs based on characteristics
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of the request.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <p>Three directives are provided by this module:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <code>CustomLog</code> to define a log file and format in one
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync step. The <code>TransferLog</code> and <code>CustomLog</code>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync directives can be used multiple times in each server to cause
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync each request to be logged to multiple files.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<a href="/logs.html">Apache Log Files</a>.</seealso>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <p>The format argument to the <code>LogFormat</code> and
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <code>CustomLog</code> directives is a string. This string is
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync logged to the log file for each request. It can contain literal
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync characters copied into the log files and the c-type control
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync characters "\n" and "\t" to represent new-lines and tabs.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Literal quotes and back-slashes should be escaped with
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync back-slashes.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <p>The characteristics of the request itself are logged by
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync placing "%" directives in the format string, which are replaced
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync in the log file by the values as follows:</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<td>Bytes sent, excluding HTTP headers. In CLF format
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynci.e. a '-' rather than a 0 when no bytes are sent.</td></tr>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<td>The contents of cookie "Foobar" in the request sent to the server.</td></tr>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<td>The time taken to serve the request, in microseconds.</td></tr>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<td>The contents of the environment variable FOOBAR</td></tr>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<td>The contents of Foobar: header line(s) in the request
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<td>Remote logname (from identd, if supplied)</td></tr>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<td>The contents of note "Foobar" from another module.</td></tr>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<td>The contents of Foobar: header line(s) in the reply.</td></tr>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<td>The canonical Port of the server serving the request</td></tr>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<td>The process ID of the child that serviced the request.</td></tr>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<td>The query string (prepended with a ? if a query string exists,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<td>Status. For requests that got internally redirected, this is
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncthe status of the *original* request --- %...>s for the last.</td></tr>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<td>Time, in common log format time format (standard english format)</td></tr>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<td>The time, in the form given by format, which should
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncbe in strftime(3) format. (potentially localized)</td></tr>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<td>The time taken to serve the request, in seconds.</td></tr>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<td>Remote user (from auth; may be bogus if return status (%s) is 401)</td></tr>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<td>The URL path requested, not including any query string.</td></tr>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<td>The canonical ServerName of the server serving the request.</td></tr>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<td>The server name according to the UseCanonicalName setting.</td></tr>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<td>Connection status when response is completed.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync'X' = connection aborted before the response completed.<br>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync'+' = connection may be kept alive after the response is sent.<br>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync'-' = connection will be closed after the response is sent.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<blockquote><table><tr><td bgcolor="#e0e5f5">(This directive was %...c in late versions of Apache 1.3, but
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncthis conflicted with the historical ssl %...{var}c syntax.)</td></tr></table></blockquote>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <p>The "..." can be nothing at all (<em>e.g.</em>, <code>"%h %u
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync %r %s %b"</code>), or it can indicate conditions for inclusion
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of the item (which will cause it to be replaced with "-" if the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync condition is not met). The forms of condition are a list of
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync HTTP status codes, which may or may not be preceded by "!".
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Thus, "%400,501{User-agent}i" logs User-agent: on 400 errors
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and 501 errors (Bad Request, Not Implemented) only;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync "%!200,304,302{Referer}i" logs Referer: on all requests which
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync did <strong>not</strong> return some sort of normal status.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <p>Note that there is no escaping performed on the strings from
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync %...r, %...i and %...o. This is mainly to comply with the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync requirements of the Common Log Format. This implies that
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync clients can insert control characters into the log, so care
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync should be taken when dealing with raw log files.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <dd><code>"%h %l %u %t \"%r\" %>s %b"</code></dd>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <dd><code>"%v %h %l %u %t \"%r\" %>s %b"</code></dd>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <dd><code>"%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <p>Note that the canonical <a href="core.html#servername">ServerName</a> and <a href="mpm_common.html#listen">Listen</a> of the server serving the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync request are used for <code>%v</code> and <code>%p</code>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync respectively. This happens regardless of the <a href="core.html#usecanonicalname">UseCanonicalName</a> setting
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync because otherwise log analysis programs would have to duplicate
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the entire vhost matching algorithm in order to decide what
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync host really served the request.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <p>See the <a href="/misc/security_tips.html#serverroot">security tips</a>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync document for details on why your security could be compromised
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync if the directory where logfiles are stored is writable by
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync anyone other than the user that starts the server.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync</summary><h2>Directives</h2><ul><li><a href="#cookielog">CookieLog</a></li><li><a href="#customlog">CustomLog</a></li><li><a href="#logformat">LogFormat</a></li><li><a href="#transferlog">TransferLog</a></li></ul><hr/><h2><a name="CookieLog">CookieLog</a> <a name="cookielog">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Sets filename for the logging of cookies</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td><syntax>CookieLog <em>filename</em></syntax></td></tr><tr><td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>none</code></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynchost</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Base</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_log_config</td></tr><tr><td align="left" valign="top"><a href="directive-dict.html#Compatibility" class="help">Compatibility:</a></td><td>Only available in Apache 1.2 and above</td></tr></table></td></tr></table><usage>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <p>The <code class="directive">CookieLog</code> directive sets the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync filename for logging of cookies. The filename is relative to the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <a href="core.html#serverroot" class="directive"><code class="directive">serverroot</code></a>. This directive is
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync included only for compatibility with <code><a href="mod_cookies.html">mod_cookies</a></code>,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and is deprecated.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync</usage><hr/><h2><a name="CustomLog">CustomLog</a> <a name="customlog">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Sets filename and format of log file</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td><syntax>CustomLog
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <em>file</em>|<em>pipe</em> <em>format</em>|<em>nickname</em>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync [env=[!]<em>environment-variable</em>]</syntax></td></tr><tr><td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>none</code></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynchost</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Base</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_log_config</td></tr><tr><td align="left" valign="top"><a href="directive-dict.html#Compatibility" class="help">Compatibility:</a></td><td>Nickname only available in Apache 1.3 or later.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncConditional logging available in 1.3.5 or later.</td></tr></table></td></tr></table><usage>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <p>The <code class="directive">CustomLog</code> directive is used to
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync log requests to the server. A log format is specified, and the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync logging can optionally be made conditional on request
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync characteristics using environment variables.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <p>The first argument, which specifies the location to which
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the logs will be written, can take on one of the following two
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync types of values:</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <dd>A filename, relative to the <a href="core.html#serverroot">ServerRoot</a>.</dd>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <dd>The pipe character "<code>|</code>", followed by the path
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync to a program to receive the log information on its standard
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync input. <strong>Security:</strong> if a program is used, then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync it will be run under the user who started httpd. This will be
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync root if the server was started by root; be sure that the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync program is secure.</dd>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <p>The second argument specifies what will be written to the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync log file. It can specify either a <em>nickname</em> defined by
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync a previous <a href="#logformat">LogFormat</a> directive, or it
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync can be an explicit <em>format</em> string as described in the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <p>For example, the following two sets of directives have
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync exactly the same effect:</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync # CustomLog with format nickname<br>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync LogFormat "%h %l %u %t \"%r\" %>s %b" common<br>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync # CustomLog with explicit format string<br>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync CustomLog logs/access_log "%h %l %u %t \"%r\" %>s %b"<br>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <p>The third argument is optional and allows the decision on
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync whether or not to log a particular request to be based on the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync presence or absence of a particular variable in the server
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync environment. If the specified <a href="/env.html">environment
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync variable</a> is set for the request (or is not set, in the case
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of a '<code>env=!<em>name</em></code>' clause), then the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync request will be logged.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <p>Environment variables can be set on a <em>per</em>-request
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync basis using the <code><a href="mod_setenvif.html">mod_setenvif</a></code>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and/or <code><a href="mod_rewrite.html">mod_rewrite</a></code> modules. For
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync example, if you don't want to record requests for all GIF
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync images on your server in a separate logfile but not your main
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync log, you can use:</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync SetEnvIf Request_URI \.gif$ gif-image<br>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync CustomLog gif-requests.log common env=gif-image<br>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync CustomLog nongif-requests.log common env=!gif-image
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync</usage><hr/><h2><a name="LogFormat">LogFormat</a> <a name="logformat">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Describes a format for use in a log file</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td><syntax>LogFormat
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <em>format</em>|<em>nickname</em> [<em>nickname</em>]</syntax></td></tr><tr><td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>none</code></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynchost</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Base</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_log_config</td></tr><tr><td align="left" valign="top"><a href="directive-dict.html#Compatibility" class="help">Compatibility:</a></td><td>Nickname only available in Apache 1.3 or later.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <p>This directive specifies the format of the access log
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <p>The <code class="directive">LogFormat</code> directive can take one of two
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync forms. In the first form, where only one argument is specified,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync this directive sets the log format which will be used by logs
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync specified in subsequent <code class="directive">TransferLog</code>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync directives. The single argument can specify an explicit
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <em>format</em> as discussed in <a href="#formats">custom log
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync formats</a> section above. Alternatively, it can use a
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <em>nickname</em> to refer to a log format defined in a
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync previous <code class="directive">LogFormat</code> directive as described
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <p>The second form of the <code class="directive">LogFormat</code>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync directive associates an explicit <em>format</em> with a
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <em>nickname</em>. This <em>nickname</em> can then be used in
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync subsequent <code class="directive">LogFormat</code> or
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <code class="directive">CustomLog</code> directives rather than
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync repeating the entire format string. A
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync directive which defines a nickname <strong>does nothing
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync else</strong> -- that is, it <em>only</em> defines the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync nickname, it doesn't actually apply the format and make it the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync default. Therefore, it will not affect subsequent
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <code class="directive">TransferLog</code> directives.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync</usage><hr/><h2><a name="TransferLog">TransferLog</a> <a name="transferlog">Directive</a></h2><table cellpadding="1" cellspacing="0" border="0" bgcolor="#cccccc"><tr><td><table bgcolor="#ffffff"><tr><td><strong>Description: </strong></td><td>Specifly location of a log file</td></tr><tr><td><a href="directive-dict.html#Syntax" class="help">Syntax:</a></td><td><syntax>TransferLog <em>file</em>|<em>pipe</em></syntax></td></tr><tr><td><a href="directive-dict.html#Default" class="help">Default:</a></td><td><code>none</code></td></tr><tr><td><a href="directive-dict.html#Context" class="help">Context:</a></td><td>server config, virtual
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynchost</td></tr><tr><td><a href="directive-dict.html#Status" class="help">Status:</a></td><td>Base</td></tr><tr><td><a href="directive-dict.html#Module" class="help">Module:</a></td><td>mod_log_config</td></tr><tr><td align="left" valign="top"><a href="directive-dict.html#Compatibility" class="help">Compatibility:</a></td><td/></tr></table></td></tr></table><usage>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync <p>This directive has exactly the same arguments and effect as
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the <code class="directive">CustomLog</code> directive, with the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync exception that it does not allow the log format to be specified
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync explicitly or for conditional logging of requests. Instead, the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync log format is determined by the most recently specified
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync specified <code class="directive">LogFormat</code> directive (which
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync does not define a nickname). Common Log Format is used if no
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync other format has been specified.</p>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync<blockquote><table cellpadding="10"><tr><td bgcolor="#eeeeee"><code>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""<br>