From: Kaspar Brand Date: Wed, 8 Apr 2015 07:33:39 +0000 (+0000) Subject: UNSET the VirtualHost's LogLevel just before calling ap_merge_log_config(), X-Git-Tag: 2.5.0-alpha~3328 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5a6a4b52ecd5c5b927e9bbc753d766cbbc8bd787;p=apache UNSET the VirtualHost's LogLevel just before calling ap_merge_log_config(), to make sure that the DEFAULT_LOGLEVEL (APLOG_WARNING) is also in effect when ap_process_config_tree() in main.c:main() walks through the VirtualHost sections. See https://mail-archives.apache.org/mod_mbox/httpd-dev/201404.mbox/%3C535CC85B.80501%40velox.ch%3E for one case this is addressing. This reverts the change from r1024427 on the one hand, but still ensures correct LogLevel merging on the other hand. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1672014 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 4aec913aa7..9ca4cccf7f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) core: Make sure to also print VirtualHost log messages of level + "warn" or higher at configuration parsing time. [Kaspar Brand] + *) mod_logio: Add LogIOTrackTTFB and %^FB logformat to log the time taken to start writing response headers. [Eric Covener] diff --git a/server/config.c b/server/config.c index aea1ff1dbd..00f982b630 100644 --- a/server/config.c +++ b/server/config.c @@ -2194,7 +2194,7 @@ AP_CORE_DECLARE(const char *) ap_init_virtual_host(apr_pool_t *p, s->keep_alive = -1; s->keep_alive_max = -1; s->error_log = main_server->error_log; - s->log.level = APLOG_UNSET; + s->log.level = main_server->log.level; s->log.module_levels = NULL; /* useful default, otherwise we get a port of 0 on redirects */ s->port = main_server->port; @@ -2286,6 +2286,7 @@ AP_DECLARE(void) ap_fixup_virtual_hosts(apr_pool_t *p, server_rec *main_server) if (virt->keep_alive_max == -1) virt->keep_alive_max = main_server->keep_alive_max; + virt->log.level = APLOG_UNSET; ap_merge_log_config(&main_server->log, &virt->log); dconf = ap_get_core_module_config(virt->lookup_defaults);