you can define error log separately per vhost inside the vhost
configuration
On Sun, Aug 3, 2014 at 5:30 PM, Leo Nikolaev wrote:
> Hi,
>
>
>
> I’d like to propose a small patch to the error log routines.
>
>
>
> Here is the abstract. A lot of ISP’s and other hosting providers use
> mod_vhost_alias and VirtualDocumentRoot directive to provide effective
> configuration of virtual hosts.
>
>
>
> The problem comes in, when you would like to provide separate log per
> virtual host. With access log it could be easily done via log pipe: we can
> add %v variable and pass it along to some script or application, which will
> put the log line to virtual host log file.
>
>
>
> But error log is more tricky – there is no information about virtual host
> at all, so error log piping gives no ability to understand the vhost, which
> caused the error.
>
>
>
> Sure, information in error log is not always connected to any virtual
> host, it could be just some information like “Whoa, I’ve just started” or
> smth else. But there is a code, which checks whether there is request or
> even connection (lines 912 and 918 in log.c)
>
>
>
> So will it be reasonable to add [vhost: %s] section to error log string?
> Of we have info->r, we have the Host header value or host name for sure
> there.
>
>
>
> Cheers,
>
> Leo
>
>
>
>
>
>
>