]> granicus.if.org Git - apache/commitdiff
document DeflateFilterNote changes
authorAndre Malo <nd@apache.org>
Wed, 1 Jan 2003 21:13:42 +0000 (21:13 +0000)
committerAndre Malo <nd@apache.org>
Wed, 1 Jan 2003 21:13:42 +0000 (21:13 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98151 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_deflate.xml

index b9711307ba1b7882ff3e5ce8240430c6d76a5bf0..a522d701c671067d46ca9e8290cfcf3eb1dcf012 100644 (file)
@@ -16,7 +16,7 @@ client</description>
     your server to be compressed before being sent to the client over
     the network.</p>
 </summary>
-<seealso><a href="../filter.html">The filter documentation</a></seealso>
+<seealso><a href="../filter.html">Filters</a></seealso>
 
 <section id="recommended"><title>Recommended Configuration</title>
     <p>This is a sample configuration for the impatient. But please take
@@ -190,9 +190,10 @@ client</description>
 <directivesynopsis>
 <name>DeflateFilterNote</name>
 <description>Places the compression ratio in a note for logging</description>
-<syntax>DeflateFilterNote <var>notename</var></syntax>
+<syntax>DeflateFilterNote [<var>type</var>] <var>notename</var></syntax>
 <contextlist><context>server config</context><context>virtual host</context>
 </contextlist>
+<compatibility><var>type</var> is available since Apache 2.1</compatibility>
 
 <usage>
     <p>The <directive>DeflateFilterNote</directive> directive
@@ -208,6 +209,34 @@ client</description>
       LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate<br />
       CustomLog logs/deflate_log deflate
     </example>
+
+    <p>If you want to extract more accurate values from your logs, you
+    can use the <var>type</var> argument to specify the type of data
+    left as note for logging. <var>type</var> can be one of:</p>
+
+    <dl>
+      <dt><code>Input</code></dt>
+      <dd>Store the byte count of the filter's input stream in the note.</dd>
+
+      <dt><code>Output</code></dt>
+      <dd>Store the byte count of the filter's output stream in the note.</dd>
+
+      <dt><code>Ratio</code></dt>
+      <dd>Store the compression ratio (<code>output/input * 100</code>)
+      in the note. This is the default, if the <var>type</var> argument
+      is omitted.</dd>
+    </dl>
+
+    <p>Thus you may log it this way:</p>
+
+    <example><title>Accurate Logging</title>
+      DeflateFilterNote Input instream<br />
+      DeflateFilterNote Output outstream<br />
+      DeflateFilterNote Ratio ratio<br />
+      <br />
+      LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate<br />
+      CustomLog logs/deflate_log deflate
+    </example>
 </usage>
 <seealso><module>mod_log_config</module></seealso>
 </directivesynopsis>