From: Jeff Trawick Date: Mon, 23 Sep 2013 18:15:32 +0000 (+0000) Subject: allow the provider to decide whether or not APLOG_NOTICE X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c897160670ad680f14ee0d61c3f460b5cf4982b4;p=thirdparty%2Fapache%2Fhttpd.git allow the provider to decide whether or not APLOG_NOTICE messages should be logged git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1525664 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/loggers/mod_syslog.c b/modules/loggers/mod_syslog.c index 6ab703d158f..0c9320525fc 100644 --- a/modules/loggers/mod_syslog.c +++ b/modules/loggers/mod_syslog.c @@ -129,7 +129,10 @@ static apr_status_t syslog_error_log(const ap_errorlog_info *info, void *handle, const char *errstr, int len) { int level = info->level; - syslog(level < LOG_PRIMASK ? level : APLOG_DEBUG, "%.*s", (int)len, errstr); + + if (level != APLOG_NOTICE) { + syslog(level < LOG_PRIMASK ? level : APLOG_DEBUG, "%.*s", (int)len, errstr); + } return APR_SUCCESS; } diff --git a/server/log.c b/server/log.c index 01851241690..bd40a591e38 100644 --- a/server/log.c +++ b/server/log.c @@ -1047,27 +1047,18 @@ static void log_error_core(const char *file, int line, int module_index, int configured_level = r ? ap_get_request_module_loglevel(r, module_index) : c ? ap_get_conn_server_module_loglevel(c, s, module_index) : ap_get_server_module_loglevel(s, module_index); - if (s->error_log) { - /* - * If we are doing normal logging, don't log messages that are - * above the module's log level unless it is a startup/shutdown notice - */ - if ((level_and_mask != APLOG_NOTICE) - && (level_and_mask > configured_level)) { - return; - } + /* + * If we are doing normal logging, don't log messages that are + * above the module's log level unless it is a startup/shutdown notice + */ + if ((level_and_mask != APLOG_NOTICE) + && (level_and_mask > configured_level)) { + return; + } + if (s->error_log) { logf = s->error_log; } - else { - /* - * If we are doing logging using provider, don't log messages that are - * above the module's log level (including a startup/shutdown notice) - */ - if (level_and_mask > configured_level) { - return; - } - } /* the faked server_rec from mod_cgid does not have s->module_config */ if (s->module_config) {