On 23.02.2014 09:03, Kaspar Brand wrote: > Yes, that's the underlying issue which changing cmd->server to NULL in > the ap_log_error actually uncovers: it's a somewhat (at least IMO) > unfortunate side effect of how the LogLevel for a new VirtualHost is > inherited/merged from the global LogLevel directive, or more > specifically, the order in which it happens. > > If you insert "LogLevel warn" (or higher) in the VirtualHost block > *before* any SSLCertificateChainFile directive, then you'll see the > vhost-scope warnings on stderr (or in the log on reloads) as well. > > One potential fix could consist of the attached patch for > server/config.c, though I'm not sure if it doesn't have unwanted side > effects, either (cf. r1024427 as to why it was last changed into the > opposite direction).
After another look at this, an better solution might be the attached patch - any opinions/insights from people who are more familiar with the logging stuff than me? Kaspar
Index: server/config.c =================================================================== --- server/config.c (revision 1590359) +++ server/config.c (working copy) @@ -2192,7 +2192,7 @@ AP_CORE_DECLARE(const char *) ap_init_virtual_host 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; @@ -2284,6 +2284,7 @@ AP_DECLARE(void) ap_fixup_virtual_hosts(apr_pool_t 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);