<p>Specifying <code>connection</code> or <code>request</code> as first
parameter allows to specify additional formats, causing additional
information to be logged when the first message is logged for a specific
- connection or request, respectivly. This additional information is only
+ connection or request, respectively. This additional information is only
logged once per connection/request. If a connection or request is processed
without causing any log message, the additional information is not logged
either.</p>
example, the Referer header is only present if the log message is
associated to a request and the log message happens at a time when the
Referer header has already been read from the client. If no output is
- produced, the default behaviour is to delete everything from the preceeding
+ produced, the default behavior is to delete everything from the preceeding
space character to the next space character. This means the log line is
implicitly divided into fields on non-whitespace to whitespace transitions.
If a format string item does not produce output, the whole field is
(percent space) is a zero-witdh field delimiter that does not produce any
output.</p>
- <p>The above behaviour can be changed by adding modifiers to the format
+ <p>The above behavior can be changed by adding modifiers to the format
string item. A <code>-</code> (minus) modifier causes a minus to be logged if the
respective item does not produce any output. In once-per-connection/request
formats, it is also possible to use the <code>+</code> (plus) modifier. If an
message is not higher than the specified log severity level. The number can
range from 1 (alert) over 4 (warn) and 7 (debug) to 15 (trace8).</p>
+ <table class="bordered"><tr class="header"><th>Modified Token</th><th>Meaning</th></tr>
+<tr>
+ <td><code>%-{Referer}i</code></td>
+ <td>Logs a <code>-</code> if <code>Referer</code> is not set.</td>
+ </tr>
+<tr class="odd">
+ <td><code>%+{Referer}i</code></td>
+ <td>Omits the entire line if <code>Referer</code> is not set.</td>
+ </tr>
+<tr>
+ <td><code>%4{Referer}i</code></td>
+ <td>Logs the <code>Referer</code> only if the log message severity
+ is higher than 4.</td>
+ </tr>
+</table>
+
<p>Some format string items accept additional parameters in braces.</p>
<table class="bordered"><tr class="header"><th>Format String</th> <th>Description</th></tr>
<tr><td><code>%%</code></td>
<td>The percent sign</td></tr>
-<tr class="odd"><td><code>%...a</code></td>
+<tr class="odd"><td><code>%a</code></td>
<td>Remote IP-address and port</td></tr>
-<tr><td><code>%...A</code></td>
+<tr><td><code>%A</code></td>
<td>Local IP-address and port</td></tr>
-<tr class="odd"><td><code>%...{<em>name</em>}e</code></td>
+<tr class="odd"><td><code>%{<em>name</em>}e</code></td>
<td>Request environment variable <em>name</em></td></tr>
-<tr><td><code>%...E</code></td>
+<tr><td><code>%E</code></td>
<td>APR/OS error status code and string</td></tr>
-<tr class="odd"><td><code>%...F</code></td>
+<tr class="odd"><td><code>%F</code></td>
<td>Source file name and line number of the log call</td></tr>
-<tr><td><code>%...{<em>name</em>}i</code></td>
+<tr><td><code>%{<em>name</em>}i</code></td>
<td>Request header <em>name</em></td></tr>
-<tr class="odd"><td><code>%...k</code></td>
+<tr class="odd"><td><code>%k</code></td>
<td>Number of keep-alive requests on this connection</td></tr>
-<tr><td><code>%...l</code></td>
+<tr><td><code>%l</code></td>
<td>Loglevel of the message</td></tr>
-<tr class="odd"><td><code>%...L</code></td>
+<tr class="odd"><td><code>%L</code></td>
<td>Log ID of the request</td></tr>
-<tr><td><code>%...{c}L</code></td>
+<tr><td><code>%{c}L</code></td>
<td>Log ID of the connection</td></tr>
-<tr class="odd"><td><code>%...{C}L</code></td>
+<tr class="odd"><td><code>%{C}L</code></td>
<td>Log ID of the connection if used in connection scope, empty otherwise</td></tr>
-<tr><td><code>%...m</code></td>
+<tr><td><code>%m</code></td>
<td>Name of the module logging the message</td></tr>
<tr class="odd"><td><code>%M</code></td>
<td>The actual log message</td></tr>
-<tr><td><code>%...{<em>name</em>}n</code></td>
+<tr><td><code>%{<em>name</em>}n</code></td>
<td>Request note <em>name</em></td></tr>
-<tr class="odd"><td><code>%...P</code></td>
+<tr class="odd"><td><code>%P</code></td>
<td>Process ID of current process</td></tr>
-<tr><td><code>%...T</code></td>
+<tr><td><code>%T</code></td>
<td>Thread ID of current thread</td></tr>
-<tr class="odd"><td><code>%...{g}T</code></td>
+<tr class="odd"><td><code>%{g}T</code></td>
<td>System unique thread ID of current thread (the same ID as
displayed by e.g. <code>top</code>; currently Linux only)</td></tr>
-<tr><td><code>%...t</code></td>
+<tr><td><code>%t</code></td>
<td>The current time</td></tr>
-<tr class="odd"><td><code>%...{u}t</code></td>
+<tr class="odd"><td><code>%{u}t</code></td>
<td>The current time including micro-seconds</td></tr>
-<tr><td><code>%...{cu}t</code></td>
+<tr><td><code>%{cu}t</code></td>
<td>The current time in compact ISO 8601 format, including
micro-seconds</td></tr>
-<tr class="odd"><td><code>%...v</code></td>
+<tr class="odd"><td><code>%v</code></td>
<td>The canonical <code class="directive"><a href="#servername">ServerName</a></code>
of the current server.</td></tr>
-<tr><td><code>%...V</code></td>
+<tr><td><code>%V</code></td>
<td>The server name of the server serving the request according to the
<code class="directive"><a href="#usecanonicalname">UseCanonicalName</a></code>
setting.</td></tr>
<strong>fail with an error</strong> saying the directory cannot be found.
</p>
- <p>For further control over the behaviour of the server when no files or
+ <p>For further control over the behavior of the server when no files or
directories match, prefix the path with the modifiers <var>optional</var>
or <var>strict</var>. If <var>optional</var> is specified, any wildcard
file or directory that does not match will be silently ignored. If
<div class="note"><h3>Note</h3>
<p>Because <code class="directive">SetHandler</code> overrides default handlers,
- normal behaviour such as handling of URLs ending in a slash (/) as
+ normal behavior such as handling of URLs ending in a slash (/) as
directories or index files is suppressed.</p></div>
<h3>See also</h3>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="TraceEnable" id="TraceEnable">TraceEnable</a> <a name="traceenable" id="traceenable">Directive</a></h2>
<table class="directive">
-<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines the behaviour on <code>TRACE</code> requests</td></tr>
+<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Determines the behavior on <code>TRACE</code> requests</td></tr>
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>TraceEnable <var>[on|off|extended]</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>TraceEnable on</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>