One operational issue with this is that if the logger process dies, existing httpd processes will get a SIGPIPE signal on subsequent writes. Restarting the logger process does not restore the lost connections.
On Fri, Apr 3, 2009 at 12:38 PM, Torsten Foertsch <torsten.foert...@gmx.net> wrote: > On Fri 03 Apr 2009, E R wrote: >> I want to send all error output to a process for specialized logging. >> I know that you can use CustomLog with a pipe. However, will that >> capture output from things like 'print STDERR ...' or if an XS module >> directly writes to stderr? I need that output to also go to my >> logging process. >> >> Does anyone know if there an Apache module which does this? > > Give a named pipe's name to ErrorLog outside any virtual host. Then have > your process read from that pipe. > > At shell level: > > mkfifo /path/to/PIPE > your_program </path/to/PIPE > > in httpd.conf: > > ErrorLog /path/to/PIPE > > I'd very much recommend to monitor "your_program" and have it restarted > automatically if it crashes. The simplest way to do that is to start it > via /etc/inittab. > > Torsten > > -- > Need professional mod_perl support? > Just hire me: torsten.foert...@gmx.net >