httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alasdair Lumsden" <apa...@alivewww.com>
Subject [users@httpd] Customising/Piping ErrorLog
Date Tue, 20 May 2003 14:51:11 GMT
Hello,

To save having a separate AccessLog per VirtualHost, I'm piping out one
main CustomLog to pglogd (Send's the log input to a Postgresql
database). I'm using the %v option in the CustomLog format to work out
which VirtualHost the log entry corresponds to.

I want to do the same thing for the ErrorLog, however there seems to be
no way to customise the ErrorLog format, to add the equivalent of %v to
it.

I was wondering if it was at all possible to somehow prepend the
VirtualHost servername to entries in the ErrorLog.

I've searched through the post archives, and the only relevant post I
could find was this, from 2000:

http://marc.theaimsgroup.com/?l=apache-httpd-dev&m=96942558432770&w=2

The only solution I can think of is to do something along the lines of
this in each virtualhost:

<Virtualhost>
  ServerName www.domain.com
  ErrorLog "|/path/to/script.sh domain.com"
</VirtualHost>

The script then knows which domain the errors are coming from by the
argument passed to it. However, this is just as bad as outputting to a
file, as each VirtualHost will open a pipe. This I would imagine, for
several thousand VirtualHost's, would open several thousand shell
interpreters. In many ways this is worse than opening several thousand
log files and just rotating them on a regular interval (how it's done at
the moment).

If anyone knows of a way to modify the source code to do this, or can
suggest any other alternatives, it would be appreciated.

Also if anyone was willing to modify the source code, we may be willing
to pay for an acceptable solution (not much, mind!) - email me off list
if interested.

Many thanks.

Regards,

Alasdair



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message