mod_log_debug.html.en revision c819c19c2f1ffbf3a3f12a4070cc6c3f4ea2a6f2
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger This file is generated from xml source: DO NOT EDIT
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<title>mod_log_debug - Apache HTTP Server</title>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<link href="/images/favicon.ico" rel="shortcut icon" /></head>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<p class="apache">Apache HTTP Server Version 2.3</p>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<img alt="" src="/images/feather.gif" /></div>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<div class="up"><a href="./"><img title="<-" alt="<-" src="/images/left.gif" /></a></div>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.3</a> > <a href="./">Modules</a></div>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<div id="preamble"><h1>Apache Module mod_log_debug</h1>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<p><span>Available Languages: </span><a href="/en/mod/mod_log_debug.html" title="English"> en </a></p>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>Additional configurable debug logging</td></tr>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<tr><th><a href="module-dict.html#ModuleIdentifier">Module�Identifier:</a></th><td>log_debug_module</td></tr>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<tr><th><a href="module-dict.html#SourceFile">Source�File:</a></th><td>mod_log_debug.c</td></tr>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<tr><th><a href="module-dict.html#Compatibility">Compatibility:</a></th><td>Available in Apache 2.3.14 and later</td></tr></table>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<div id="quickview"><h3 class="directives">Directives</h3>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<li><img alt="" src="/images/down.gif" /> <a href="#logmessage">LogMessage</a></li>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<li><img alt="" src="/images/down.gif" /> <a href="#examples">Examples</a></li>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<h2><a name="examples" id="examples">Examples</a></h2>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger Log message after request to /foo/* is processed:
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger <Location /foo><br />
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger LogMessage "/foo has been requested"<br />
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger </Location><br />
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger Log message if request to /foo/* is processed in a sub-request:
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger <Location /foo><br />
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger LogMessage "subrequest to /foo" hook=type_checker if=%{IS_SUBREQ}<br />
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger </Location><br />
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger The default log_transaction hook is not executed for sub-requests,
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger therefore we have to use a different hook.
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger Log message if an IPv6 client causes a request timeout:
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger LogMessage "IPv6 timeout from %{REMOTE_ADDR}"
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger "if=-T %{IPV6} && %{REQUEST_STATUS} = 408"
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger Note the placing of the dobule quotes for the <code>if=</code> argument.
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger Log the value of the "X-Foo" request environment variable in each
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger stage of the request:
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger <Location /><br />
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger LogMessage "%{reqenv:X-Foo}" hook=all<br />
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger </Location><br />
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger Together with the microsecond time stamps in the error log, this
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger allows to determine the times spent in the different parts of the
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger request processing.
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<div class="directive-section"><h2><a name="LogMessage" id="LogMessage">LogMessage</a> <a name="logmessage" id="logmessage">Directive</a></h2>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Log userdefined message to error log
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>LogMessage <var>message</var>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger[hook=<var>hook</var>] [if=<var>expression</var>]
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>Unset</code></td></tr>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>directory</td></tr>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Experimental</td></tr>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_log_debug</td></tr>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger <p>This directive causes a user defined message to be logged to the
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger error log. The message can use variables and functions from the
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger <a href="/expr.html">ap_expr syntax</a>. The messages are logged at
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger loglevel info.</p>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger <p>The hook specifies before which phase of request procesing the message
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger will be logged. The following hooks are supported:</p>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger <table class="bordered"><tr class="header"><th>Name</th></tr>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<tr><td><code>translate_name</code></td></tr>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<tr class="odd"><td><code>type_checker</code></td></tr>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<tr><td><code>quick_handler</code></td></tr>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<tr class="odd"><td><code>map_to_storage</code></td></tr>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<tr class="odd"><td><code>check_access_ex</code></td></tr>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<tr><td><code>insert_filter</code></td></tr>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<tr class="odd"><td><code>check_authn</code></td></tr>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<tr class="odd"><td><code>fixups</code></td></tr>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger<tr class="odd"><td><code>log_transaction</code></td></tr>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger <p>The default is <code>log_transaction</code>. The special value
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger <code>all</code> is also supported, causing a message to be logged at each
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger phase. Not all hooks are executed for every request.</p>
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger <p>The optional expression allows to restrict the message if a
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger condition is met. The details of the expression syntax are described in
9050453ee182fd065e53c6abbab735081eb05294Kryštof Tulinger the <a href="/expr.html">ap_expr documentation</a>.</p>
<p><span>Available Languages: </span><a href="/en/mod/mod_log_debug.html" title="English"> en </a></p>
<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div>