2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
14 http://www.apache.org/licenses/LICENSE-2.0
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
23 <modulesynopsis metafile="mod_logio.xml.meta">
25 <name>mod_logio</name>
26 <description>Logging of input and output bytes per request</description>
27 <status>Extension</status>
28 <sourcefile>mod_logio.c</sourcefile>
29 <identifier>logio_module</identifier>
33 <p>This module provides the logging of input and output number of
34 bytes received/sent per request. The numbers reflect the actual bytes
35 as received on the network, which then takes into account the
36 headers and bodies of requests and responses. The counting is done
37 before SSL/TLS on input and after SSL/TLS on output, so the numbers
38 will correctly reflect any changes made by encryption.</p>
40 <p>This module requires <module>mod_log_config</module>.</p>
42 <note>When KeepAlive connections are used with SSL, the overhead of the SSL
43 handshake is reflected in the byte count of the first request on the
44 connection. When per-directory SSL renegotiation occurs, the bytes are associated
45 with the request that triggered the renegotiation.</note>
49 <seealso><module>mod_log_config</module></seealso>
50 <seealso><a href="../logs.html">Apache Log Files</a></seealso>
52 <section id="formats">
53 <title>Custom Log Formats</title>
55 <p>This modules adds two new logging directives. The characteristics of the
56 request itself are logged by placing "<code>%</code>" directives in
57 the format string, which are replaced in the log file by the values as
60 <table border="1" style="zebra">
61 <tr><th>Format String</th>
62 <th>Description</th></tr>
64 <tr><td><code>%...I</code></td>
65 <td>Bytes received, including request and headers, cannot be
68 <tr><td><code>%...O</code></td>
69 <td>Bytes sent, including headers, cannot be zero.</td></tr>
72 <p>Usually, the functionality is used like this:</p>
75 <dt>Combined I/O log format:</dt>
76 <dd><code>"%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
77 \"%{User-agent}i\" %I %O"</code></dd>