mirror of
https://github.com/apache/httpd.git
synced 2026-01-06 09:01:14 +03:00
Follow-up to r1525597:
Initialize error log providers in vhosts, solving crashes when logging from those vhosts as well as allowing a different provider (or provider configuration) for vhosts. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1532344 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
12
server/log.c
12
server/log.c
@@ -458,6 +458,18 @@ int ap_open_logs(apr_pool_t *pconf, apr_pool_t *p /* plog */,
|
||||
virt->error_log = q->error_log;
|
||||
}
|
||||
}
|
||||
else if (virt->errorlog_provider) {
|
||||
/* separately-configured vhost-specific provider */
|
||||
if (open_error_log(virt, 0, p) != OK) {
|
||||
return DONE;
|
||||
}
|
||||
}
|
||||
else if (s_main->errorlog_provider) {
|
||||
/* inherit provider from s_main */
|
||||
virt->errorlog_provider = s_main->errorlog_provider;
|
||||
virt->errorlog_provider_handle = s_main->errorlog_provider_handle;
|
||||
virt->error_log = NULL;
|
||||
}
|
||||
else {
|
||||
virt->error_log = s_main->error_log;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user