From: Jeff Trawick Date: Mon, 9 May 2011 18:43:50 +0000 (+0000) Subject: allow error log formatters to peek at the message format X-Git-Tag: 2.3.12~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86d7dd25c4b5b4daec9581529a8a07b4dc74f5f3;p=thirdparty%2Fapache%2Fhttpd.git allow error log formatters to peek at the message format git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1101143 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/ap_mmn.h b/include/ap_mmn.h index f5307fe7ed2..83794beec2b 100644 --- a/include/ap_mmn.h +++ b/include/ap_mmn.h @@ -320,6 +320,7 @@ * change AP_CORE_DECLARE to AP_DECLARE: ap_create_request_config() * change AP_DECLARE to AP_CORE_DECLARE: ap_register_log_hooks() * 20110329.2 (2.3.12-dev) Add child_status and end_generation hooks. + * 20110329.3 (2.3.12-dev) Add format field to ap_errorlog_info. */ #define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */ @@ -327,7 +328,7 @@ #ifndef MODULE_MAGIC_NUMBER_MAJOR #define MODULE_MAGIC_NUMBER_MAJOR 20110329 #endif -#define MODULE_MAGIC_NUMBER_MINOR 2 /* 0...n */ +#define MODULE_MAGIC_NUMBER_MINOR 3 /* 0...n */ /** * Determine if the server's current MODULE_MAGIC_NUMBER is at least a diff --git a/include/http_core.h b/include/http_core.h index 7b822a52243..ca83d417466 100644 --- a/include/http_core.h +++ b/include/http_core.h @@ -718,6 +718,9 @@ typedef struct ap_errorlog_info { int using_syslog; /** 1 if APLOG_STARTUP was set for the log message, 0 otherwise */ int startup; + + /** message format */ + const char *format; } ap_errorlog_info; /** diff --git a/server/log.c b/server/log.c index 50d9cbcb3ed..735fcf823a8 100644 --- a/server/log.c +++ b/server/log.c @@ -1166,7 +1166,7 @@ static void log_error_core(const char *file, int line, int module_index, info.status = 0; info.using_syslog = (logf == NULL); info.startup = ((level & APLOG_STARTUP) == APLOG_STARTUP); - + info.format = fmt; while (!done) { apr_array_header_t *log_format;