httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r905420 - in /httpd/httpd/trunk: CHANGES docs/manual/mod/mod_log_config.xml modules/loggers/mod_log_config.c
Date Mon, 01 Feb 2010 21:38:16 GMT
Author: minfrin
Date: Mon Feb  1 21:38:15 2010
New Revision: 905420

URL: http://svn.apache.org/viewvc?rev=905420&view=rev
Log:
mod_log_config: Add the R option to log the handler used within the
request.
Submitted by: Christian Folini <christian.folini netnea com>

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/docs/manual/mod/mod_log_config.xml
    httpd/httpd/trunk/modules/loggers/mod_log_config.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=905420&r1=905419&r2=905420&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Mon Feb  1 21:38:15 2010
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.3.6
 
+  *) mod_log_config: Add the R option to log the handler used within the
+     request. [Christian Folini <christian.folini netnea com>]
+
   *) Allow fine control over the removal of Last-Modified and ETag headers
      within the INCLUDES filter, making it possible to cache responses if
      desired. Fix the default value of the SSIAccessEnable directive.

Modified: httpd/httpd/trunk/docs/manual/mod/mod_log_config.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_log_config.xml?rev=905420&r1=905419&r2=905420&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_log_config.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_log_config.xml Mon Feb  1 21:38:15 2010
@@ -159,6 +159,9 @@
     <tr><td><code>%r</code></td>
         <td>First line of request</td></tr>
 
+    <tr><td><code>%R</code></td>
+        <td>The handler generating the response (if any).</td></tr>
+
     <tr><td><code>%s</code></td>
         <td>Status. For requests that got internally redirected, this is
         the status of the *original* request --- <code>%&gt;s</code>
@@ -267,6 +270,11 @@
       format provided by <module>mod_logio</module> will log the
       actual number of bytes sent over the network.</p>
 
+      <p>Note: <module>mod_cache</module> is implemented as a
+      quick-handler and not as a standard handler. Therefore, the
+      <code>%R</code> format string will not return any handler
+      information when content caching is involved.</p>
+
     </section>
 
     <section id="examples"><title>Examples</title>

Modified: httpd/httpd/trunk/modules/loggers/mod_log_config.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/loggers/mod_log_config.c?rev=905420&r1=905419&r2=905420&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/loggers/mod_log_config.c (original)
+++ httpd/httpd/trunk/modules/loggers/mod_log_config.c Mon Feb  1 21:38:15 2010
@@ -376,6 +376,11 @@
     return pfmt(r->pool, r->status);
 }
 
+static const char *log_handler(request_rec *r, char *a)
+{
+    return ap_escape_logitem(r->pool, r->handler);
+}
+
 static const char *clf_log_bytes_sent(request_rec *r, char *a)
 {
     if (!r->sent_bodyct || !r->bytes_sent) {
@@ -1530,6 +1535,7 @@
         log_pfn_register(p, "T", log_request_duration, 1);
         log_pfn_register(p, "U", log_request_uri, 1);
         log_pfn_register(p, "s", log_status, 1);
+        log_pfn_register(p, "R", log_handler, 1);
     }
 
     return OK;



Mime
View raw message