> -----Original Message-----
> From: Jan Kaluža 
> Sent: Donnerstag, 17. Oktober 2013 13:21
> To: dev@httpd.apache.org
> Subject: Re: error log providers, multiple vhosts, mod_syslog
> 
> There's another problem with log providers and vhosts and I think I have
> no idea how to fix it without doing dirty hacks...
> 
> The problem is with ap_open_logs function, which does following:
> 
> 1. Main server log is opened (open_error_log()). If this log uses error
> log provider, s_main->error_log is set to NULL.
> 
> 2. When there is no s_main->error_log, stderr is redirected to /dev/null.

Hmm. This points out another issue when using an error log provider for the 
main server log:
We lose everything that the server or other programs like CGI-scripts write to 
the stderr FD as it
is simply written to /dev/null. Don't we need to have a separate process in 
this case that
like a piped logger reads from the reading end of the "stderr pipe" and writes 
it
via ap_server_conf->errorlog_provider->writer to the log?

> 
> 3. Error logs for vhosts are opened (another open_error_log()). If there
> is some problem when opening these logs, any ap_log_error() call is sent
> to /dev/null.

Wouldn't it try to call s->errorlog_provider->writer in line 1196 and Segfault 
if s->errorlog_provider
is NULL because of some bad "classic" configuration that simply failed?

Regards

Rüdiger

Reply via email to