From: Ryan Bloom Date: Mon, 8 Oct 2001 23:28:57 +0000 (+0000) Subject: Clean up the string passed to the error log hook. This removes the date, X-Git-Tag: 2.0.26~72 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=61cebdad7a81721e926fa344ef46637e5a7c2426;p=thirdparty%2Fapache%2Fhttpd.git Clean up the string passed to the error log hook. This removes the date, time, error level, etc strings. The only information in the string is the actual error. Submitted by: Jon Travis git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91373 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/log.c b/server/log.c index 3991e68661a..7bd99b017e2 100644 --- a/server/log.c +++ b/server/log.c @@ -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,