> For some reason my apache error logs, insist upon showing the referrer
> on everyline of output.
>
> This is really becomming a pain in the butt when I'm debugging fatal
> errors. [for example the way that an app dies if you try to use a
> runmode that doesn't exist.]
>
> Is there a way to suppress the referrer in error logs, or is there a
> different way I should be debugging these sorts of things ?
Yeah, this is really annoying! Along with the timestamp and other gunk
that gets prepended to the start of every line. The worst part of it is
that if you print a multi-line string to STDERR, Apache will prepend the
timestamp and append the referrer to *each line*!
I remember searching for a solution and only getting as far as "this is
a feature not a bug, and there's no way to turn it off".
It was this feature that sent me kicking and screaming into the world of
proper logging, via CAP::LogDispatch. So I guess I should be thankful.
CAP::LogDispatch doesn't trap fatal errors by default. But you can set
a $SIG{__DIE__} handler to log errors to your regular logfile and that
might work. From the CAP::LogDispatch docs:
$SIG{__DIE__} = sub {
My::App::Subclass->log->emerg(@_); CORE::die(@_);
};
I've used that before, and it worked, but then I stopped because it
seemed to have compatibility problems with Apache::SessionX.
Michael
---
Michael Graham <[EMAIL PROTECTED]>
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]