Commit a948c915 authored by Ryan Bloom's avatar Ryan Bloom
Browse files

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 <jtravis@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91373 13f79535-47bb-0310-9956-ffa450edef68
parent 8389dc45
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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,