From: Jim Jagielski Date: Tue, 3 Jun 2014 15:22:37 +0000 (+0000) Subject: We really need some place where we can place a whole X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7efd10ace383fcd27b67bf85603c7835f17c12e4;p=thirdparty%2Fapache%2Fhttpd.git We really need some place where we can place a whole bunch of data/info-that-should-be-logged-by-all-mpms. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1599601 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/log-message-tags/next-number b/docs/log-message-tags/next-number index fe8591e4591..d16660a3e6c 100644 --- a/docs/log-message-tags/next-number +++ b/docs/log-message-tags/next-number @@ -1 +1 @@ -2639 +2640 diff --git a/include/ap_mmn.h b/include/ap_mmn.h index cbb31afc389..b4c33a038f8 100644 --- a/include/ap_mmn.h +++ b/include/ap_mmn.h @@ -454,6 +454,7 @@ * 20140207.4 (2.5.0-dev) add ap_mpm_register_socket_callback_timeout * 20140207.5 (2.5.0-dev) Add ap_mpm_resume_suspended(), AP_MPMQ_CAN_SUSPEND to * ap_mpm_query(), and suspended_baton to conn_rec + * 20140207.6 (2.5.0-dev) Added ap_log_common(). */ #define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */ @@ -461,7 +462,7 @@ #ifndef MODULE_MAGIC_NUMBER_MAJOR #define MODULE_MAGIC_NUMBER_MAJOR 20140207 #endif -#define MODULE_MAGIC_NUMBER_MINOR 5 /* 0...n */ +#define MODULE_MAGIC_NUMBER_MINOR 6 /* 0...n */ /** * Determine if the server's current MODULE_MAGIC_NUMBER is at least a diff --git a/include/http_log.h b/include/http_log.h index a71df8e2cb4..60896f45383 100644 --- a/include/http_log.h +++ b/include/http_log.h @@ -740,6 +740,13 @@ AP_DECLARE(void) ap_error_log2stderr(server_rec *s); */ AP_DECLARE(void) ap_log_command_line(apr_pool_t *p, server_rec *s); +/** + * Log common shared data + * @param s The server_rec whose process's command line we want to log. + * Misc commonly logged data is logged to that server's error log. + */ +AP_DECLARE(void) ap_log_common(server_rec *s); + /** * Log the current pid of the parent process * @param p The pool to use for processing diff --git a/server/log.c b/server/log.c index 45d6d9eba29..2d35d35e6c3 100644 --- a/server/log.c +++ b/server/log.c @@ -54,6 +54,7 @@ #include "util_time.h" #include "ap_mpm.h" #include "ap_provider.h" +#include "ap_listen.h" #if HAVE_GETTID #include @@ -1487,6 +1488,15 @@ AP_DECLARE(void) ap_log_command_line(apr_pool_t *plog, server_rec *s) "Command line: '%s'", result); } +/* grab bag function to log commonly logged and shared info */ +AP_DECLARE(void) ap_log_common(server_rec *s) +{ + ap_log_error(APLOG_MARK, APLOG_DEBUG , 0, s, APLOGNO(02639) + "Using SO_REUSEPORT: %s (%d)", + have_so_reuseport ? "yes" : "no", + num_buckets); +} + AP_DECLARE(void) ap_remove_pid(apr_pool_t *p, const char *rel_fname) { apr_status_t rv;