httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rbo...@apache.org
Subject svn commit: r1031155 - in /httpd/httpd/trunk/docs/manual: logs.html.en logs.xml
Date Thu, 04 Nov 2010 19:02:51 GMT
Author: rbowen
Date: Thu Nov  4 19:02:51 2010
New Revision: 1031155

URL: http://svn.apache.org/viewvc?rev=1031155&view=rev
Log:
Mention the %200{var}i syntax in the conditional logging doc.

Modified:
    httpd/httpd/trunk/docs/manual/logs.html.en
    httpd/httpd/trunk/docs/manual/logs.xml

Modified: httpd/httpd/trunk/docs/manual/logs.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/logs.html.en?rev=1031155&r1=1031154&r2=1031155&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/logs.html.en (original)
+++ httpd/httpd/trunk/docs/manual/logs.html.en Thu Nov  4 19:02:51 2010
@@ -474,6 +474,21 @@
       content without it. In that case a cache hit will log
       <code>-</code>, while a cache miss will log <code>1</code>.</p>
 
+      <p>In addition to the <code>env=</code> syntax, <code class="directive"><a
href="./mod/mod_log_config.html#logformat">LogFormat</a></code> supports logging
values
+      conditional upon the HTTP response code:</p>
+
+      <div class="example"><p><code>
+      LogFormat "%400,501{User-agent}i" browserlog<br />
+      LogFormat "%!200,304,302{Referer}i" refererlog
+      </code></p></div>
+
+      <p>In the first example, the <code>User-agent</code> will be
+      logged if the HTTP status code is 400 or 501. In other cases, a
+      literal "-" will be logged instead. Likewise, in the second
+      example, the <code>Referer</code> will be logged if the HTTP
+      status code is <strong>not</strong> 200, 204, or 302. (Note the
+      "!" before the status codes.</p>
+
       <p>Although we have just shown that conditional logging is very
       powerful and flexible, it is not the only way to control the
       contents of the logs. Log files are more useful when they

Modified: httpd/httpd/trunk/docs/manual/logs.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/logs.xml?rev=1031155&r1=1031154&r2=1031155&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/logs.xml (original)
+++ httpd/httpd/trunk/docs/manual/logs.xml Thu Nov  4 19:02:51 2010
@@ -504,6 +504,22 @@
       content without it. In that case a cache hit will log
       <code>-</code>, while a cache miss will log <code>1</code>.</p>
 
+      <p>In addition to the <code>env=</code> syntax, <directive
+      module="mod_log_config">LogFormat</directive> supports logging values
+      conditional upon the HTTP response code:</p>
+
+      <example>
+      LogFormat "%400,501{User-agent}i" browserlog<br />
+      LogFormat "%!200,304,302{Referer}i" refererlog
+      </example>
+
+      <p>In the first example, the <code>User-agent</code> will be
+      logged if the HTTP status code is 400 or 501. In other cases, a
+      literal "-" will be logged instead. Likewise, in the second
+      example, the <code>Referer</code> will be logged if the HTTP
+      status code is <strong>not</strong> 200, 204, or 302. (Note the
+      "!" before the status codes.</p>
+
       <p>Although we have just shown that conditional logging is very
       powerful and flexible, it is not the only way to control the
       contents of the logs. Log files are more useful when they



Mime
View raw message