]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Clean up the string passed to the error log hook. This removes the date,
authorRyan Bloom <rbb@apache.org>
Mon, 8 Oct 2001 23:28:57 +0000 (23:28 +0000)
committerRyan Bloom <rbb@apache.org>
Mon, 8 Oct 2001 23:28:57 +0000 (23:28 +0000)
time, error level, etc strings.  The only information in the string is
the actual error.
Submitted by: Jon Travis <jtravis@covalent.net>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91373 13f79535-47bb-0310-9956-ffa450edef68

server/log.c

index 3991e68661ae9f0471e18632635c73aeddd18b02..7bd99b017e2a85a996b1f2e026fc1ae19e828365 100644 (file)
@@ -339,7 +339,7 @@ static void log_error_core(const char *file, int line, int level,
                            const char *fmt, va_list args)
 {
     char errstr[MAX_STRING_LEN];
-    size_t len;
+    size_t len, errstrlen;
     apr_file_t *logf = NULL;
     const char *referer;
     int level_and_mask = level & APLOG_LEVELMASK;
@@ -439,6 +439,7 @@ static void log_error_core(const char *file, int line, int level,
        len += apr_snprintf(errstr + len, MAX_STRING_LEN - len,
                "(%d)%s: ", status, apr_strerror(status, buf, sizeof(buf)));
     }
+    errstrlen = len;
     len += apr_vsnprintf(errstr + len, MAX_STRING_LEN - len, fmt, args);
 
     if (r && (referer = apr_table_get(r->headers_in, "Referer"))) {
@@ -460,7 +461,7 @@ static void log_error_core(const char *file, int line, int level,
        syslog(level_and_mask, "%s", errstr);
     }
 #endif
-    ap_run_error_log(file, line, level, status, s, r, pool, errstr);
+    ap_run_error_log(file, line, level, status, s, r, pool, errstr + errstrlen);
 }
     
 AP_DECLARE(void) ap_log_error(const char *file, int line, int level,