Re: apache & log files
On Fri, Nov 05, 2004 at 09:09:16AM +1100, Craig Sanders wrote:
> > For ErrorLog you can pipe to a suitable program which does the same.
>
> but this doesn't. unless apache has added this feature since i last looked
> into this (about six months ago) the "suitable program" has no way of
> separating the error logs for each virtual host, because it's just STDERR with
> no vhost prefix on each line.
>
ErrorLog "| mytrickyprog www.mydomain.com"
where mytrickyprog simply echos stdin on the right per-domain file or the same
log file with the right prefix for each line.
Of course you need a different directive
for each vhost. A silly implementation would use a perl/sh script
to do the thing; a more efficient solution would use a nice tiny C
program to do the same. Both are left as exercise to the reader :)
--
Francesco P. Lovergine
Reply to: