Sophie

Sophie

distrib > Mandriva > 2010.1 > i586 > media > contrib-updates > by-pkgid > 02e45b2cd6a4a47c88f15dd2f64cf46c > files > 896

cherokee-1.0.8-1mdv2010.1.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Language" content="en-us" />
    <meta name="ROBOTS" content="ALL" />
    <meta http-equiv="imagetoolbar" content="no" />
    <meta name="MSSmartTagsPreventParsing" content="true" />
    <meta name="Keywords" content="cherokee web server httpd http" />
    <meta name="Description" content="Cherokee is a flexible, very fast, lightweight Web server. It is implemented entirely in C, and has no dependencies beyond a standard C library. It is embeddable and extensible with plug-ins. It supports on-the-fly configuration by reading files or strings, TLS/SSL (via GNUTLS or OpenSSL), virtual hosts, authentication, cache friendly features, PHP, custom error management, and much more." />
    <link href="media/css/cherokee_doc.css" rel="stylesheet" type="text/css" media="all" />
  </head>
<body>
<h2 id="_a_href_index_html_index_a_8594_a_href_modules_html_modules_a_8594_a_href_modules_loggers_html_loggers_a"><a href="index.html">Index</a> &#8594; <a href="modules.html">Modules</a> &#8594; <a href="modules_loggers.html">Loggers</a></h2>
<div class="sectionbody">
<h3 id="_logger_custom">Logger: Custom</h3><div style="clear:left"></div>
<div class="paragraph"><p>This module implements a flexible mechanism for logging requests made
to the server, using a user-specified format.</p></div>
<div class="paragraph"><p>The format in which the request will be logged is defined by a string.
This string is used to log each request to the log. It can contain
both literal characters and a set of variables. All the literal
characters will be copied to the log. The following variables will be
evaluated right before writing each log entry:</p></div>
<div class="tableblock">
<table rules="all"
width="100%"
frame="border"
cellspacing="0" cellpadding="4">
<col width="33%" />
<col width="33%" />
<col width="33%" />
<thead>
<tr>
<th align="left" valign="top">Variable                </th>
<th align="left" valign="top">Example                    </th>
<th align="left" valign="top">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top"><p class="table"><tt>${ip_remote}</tt></p></td>
<td align="left" valign="top"><p class="table">74.125.67.100</p></td>
<td align="left" valign="top"><p class="table">Remote IP-address</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>${ip_local}</tt></p></td>
<td align="left" valign="top"><p class="table">10.0.0.1</p></td>
<td align="left" valign="top"><p class="table">Local IP-address</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>${request}</tt></p></td>
<td align="left" valign="top"><p class="table">/file.txt</p></td>
<td align="left" valign="top"><p class="table">URL path requested</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>${request_original}</tt></p></td>
<td align="left" valign="top"><p class="table">/file.txt</p></td>
<td align="left" valign="top"><p class="table">URL path requested before any rewrite</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>${protocol}</tt></p></td>
<td align="left" valign="top"><p class="table">http</p></td>
<td align="left" valign="top"><p class="table">Request Protocol</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>${port_server}</tt></p></td>
<td align="left" valign="top"><p class="table">80</p></td>
<td align="left" valign="top"><p class="table">Port of the server serving the request</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>${query_string}</tt></p></td>
<td align="left" valign="top"><p class="table">?bar=foo</p></td>
<td align="left" valign="top"><p class="table">"The query string, if exists"</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>${request_first_line}</tt></p></td>
<td align="left" valign="top"><p class="table">GET / HTTP/1.0</p></td>
<td align="left" valign="top"><p class="table">First line of request</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>${status}</tt></p></td>
<td align="left" valign="top"><p class="table">200</p></td>
<td align="left" valign="top"><p class="table">Status of the request</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>${now}</tt></p></td>
<td align="left" valign="top"><p class="table">08/Apr/2009:12:02:11 +0200</p></td>
<td align="left" valign="top"><p class="table">Time: in common log format time format</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>${time_secs}</tt></p></td>
<td align="left" valign="top"><p class="table">1239185281</p></td>
<td align="left" valign="top"><p class="table">Time: seconds since Epoch</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>${time_msecs}</tt></p></td>
<td align="left" valign="top"><p class="table">18446744071655350332</p></td>
<td align="left" valign="top"><p class="table">Time: milliseconds since Epoch</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>${user_remote}</tt></p></td>
<td align="left" valign="top"><p class="table">guest</p></td>
<td align="left" valign="top"><p class="table">Remote user (authentication)</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>${vserver_name}</tt></p></td>
<td align="left" valign="top"><p class="table">default</p></td>
<td align="left" valign="top"><p class="table">Virtual Server nick name</p></td>
</tr>
</tbody>
</table>
</div>
<div class="paragraph"><p>The templating subsystem provides slicing support in pretty much the
same way that the Python strings do, allowing to use specific portions
of any of these substitution macros. You can read more about this on
the <a href="other_goodies.html#templating">Template Subsystem</a> section of
the documentation.</p></div>
<h3 id="examples">Example</h3><div style="clear:left"></div>
<div class="paragraph"><p>For instance, the following format string:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>[${now}] ${ip_remote}: ${request} (${status})</tt></pre>
</div></div>
<div class="paragraph"><p>would generate this entry in the log:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>[08/Apr/2009:12:02:11 +0200] 74.125.67.100: /file.txt (200)</tt></pre>
</div></div>
</div>
<div id="footer">
<div id="footer-text">
</div>
</div>
</body>
</html>