]> granicus.if.org Git - apache/commitdiff
Backport r1204595:
authorStefan Fritsch <sf@apache.org>
Mon, 21 Nov 2011 17:03:06 +0000 (17:03 +0000)
committerStefan Fritsch <sf@apache.org>
Mon, 21 Nov 2011 17:03:06 +0000 (17:03 +0000)
Fix logic when to call error_log hook

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1204597 13f79535-47bb-0310-9956-ffa450edef68

server/log.c

index 9fe76047be1ad795e5aa7f0d77fc1b17425751b5..90ccfa2efb8f6eb775046406cf05291f9d513e69 100644 (file)
@@ -1261,8 +1261,12 @@ static void log_error_core(const char *file, int line, int module_index,
         }
         write_logline(errstr, len, logf, level_and_mask);
 
-        if (!log_format) {
-            /* only pass the real error string to the hook */
+        if (done) {
+            /*
+             * We don't call the error_log hook for per-request/per-conn
+             * lines, and we only pass the actual log message, not the
+             * prefix and suffix.
+             */
             errstr[errstr_end] = '\0';
             ap_run_error_log(file, line, module_index, level, status, s, r, pool,
                              errstr + errstr_start);