patch to adapt mod_fastcgi logging behaviour
Chris Lightfoot <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
By default mod_fastcgi logs each line of a server's
standard error output and logs it using apache_log_rerror,
prepending it with `FastCGI: server: [name of server]
stderr:', so that by the time it's got to the log file it
might look like,
[Wed Jan 26 12:22:14 2005] [error] [client 127.0.0.1] FastCGI: server "/data/vhost/www.example.com/path/to/script/name.cgi" stderr: rolling back transaction after error: DBD::Pg::db do failed: ERROR: Cannot insert a duplicate key into unique index message_pkey
In normal CGI scripts standard error is usually connected
directly to the logfile, so such scripts often print their
own timestamps and other information at the beginning of
each line of output (q.v. CGI::Carp in perl, for
instance). I have written a patch which adds two options
which make mod_fastcgi's log output less verbose:
-log-stderr-untagged
to get rid of the `FastCGI: server: [name of server]
stderr:'; and
-log-stderr-directly
to log standard error output from FastCGI servers
directly to the error log (as mod_cgi does).
The patch is against the latest snapshot. I've tested it
on apache 1.3 but don't have an apache 2.0 installation to
play with:
http://caesious.beasts.org/~chris/tmp/20050127/log-stderr-options.patch
Comments?
--
``God is a comedian, playing to an audience that's too afraid to laugh.''
(Voltaire)
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/