]> granicus.if.org Git - apache/commitdiff
add conn_rec to error log hook
authorJeff Trawick <trawick@apache.org>
Fri, 18 Nov 2011 13:10:06 +0000 (13:10 +0000)
committerJeff Trawick <trawick@apache.org>
Fri, 18 Nov 2011 13:10:06 +0000 (13:10 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1203634 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
include/ap_mmn.h
include/http_log.h
server/log.c

diff --git a/CHANGES b/CHANGES
index 5ef4bfc251a48520c3577f88354918b12e4a840e..93fe42fb773245055b7c13f1b75139d2140b80fc 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) error log hook: add conn_rec as a parameter.  [Jeff Trawick]
+
   *) mod_ssl: drop support for the SSLv2 protocol. [Kaspar Brand]
 
   *) mod_lua: Stop losing track of all but the most specific LuaHook* directives
index dac9c1f51171b1827b272bf61049955e587d8a88..afc795555333ec4c55de53cf3ed89184dac777b9 100644 (file)
  * 20111025.1 (2.3.15-dev) Add ap_escape_urlencoded(), ap_escape_urlencoded_buffer()
  *                         and ap_unescape_urlencoded().
  * 20111025.2 (2.3.15-dev) Add ap_lua_ssl_val to mod_lua
+ * 20111118.0 (2.5.0-dev)  Add conn_rec to error_log hook
  */
 
 #define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
index 6a1717bb37932f9f1f12bd565af638516324f648..038feebd5fcf001b74f14c62f6a5146211c0be70 100644 (file)
@@ -633,6 +633,7 @@ AP_DECLARE(apr_file_t *) ap_piped_log_write_fd(piped_log *pl);
  * @param level The level of this error message
  * @param status The status code from the previous command
  * @param s The server which we are logging for
+ * @param c The connection which we are logging for
  * @param r The request which we are logging for
  * @param pool Memory pool to allocate from
  * @param errstr message to log
@@ -640,8 +641,8 @@ AP_DECLARE(apr_file_t *) ap_piped_log_write_fd(piped_log *pl);
 AP_DECLARE_HOOK(void, error_log, (const char *file, int line,
                        int module_index, int level,
                        apr_status_t status, const server_rec *s,
-                       const request_rec *r, apr_pool_t *pool,
-                       const char *errstr))
+                       const conn_rec *c, const request_rec *r,
+                       apr_pool_t *pool, const char *errstr))
 
 /**
  * hook method to generate unique id for connection or request
index 9fe76047be1ad795e5aa7f0d77fc1b17425751b5..a3b294cce1f8ae5abfe7ece013421af277037ea1 100644 (file)
@@ -1264,8 +1264,8 @@ static void log_error_core(const char *file, int line, int module_index,
         if (!log_format) {
             /* only pass the real error string to the hook */
             errstr[errstr_end] = '\0';
-            ap_run_error_log(file, line, module_index, level, status, s, r, pool,
-                             errstr + errstr_start);
+            ap_run_error_log(file, line, module_index, level, status, s, c, r,
+                             pool, errstr + errstr_start);
         }
 
         *errstr = '\0';
@@ -1761,9 +1761,9 @@ AP_DECLARE(const char *) ap_parse_log_level(const char *str, int *val)
 AP_IMPLEMENT_HOOK_VOID(error_log,
                        (const char *file, int line, int module_index, int level,
                         apr_status_t status, const server_rec *s,
-                        const request_rec *r, apr_pool_t *pool,
-                        const char *errstr), (file, line, module_index, level,
-                        status, s, r, pool, errstr))
+                        const conn_rec *c, const request_rec *r,
+                        apr_pool_t *pool, const char *errstr), (file, line,
+                        module_index, level, status, s, c, r, pool, errstr))
 
 AP_IMPLEMENT_HOOK_RUN_FIRST(int, generate_log_id,
                             (const conn_rec *c, const request_rec *r,