[guys, please trim the followups to quote only parts you reply to. Otherwise the threads are impossible to read later on. Thank you]

Daniel B. Hemmerich wrote:
Hello all...

When a misconfiguration occurs, we receive a new line in the apache error logs that is not in the standard error log format (I assume since MP is writing to STDERR). Short of changing all of our scripts to properly log, is there a quicker method to accomplish the following change:

Change this:

Can't locate /www/path/goes/here//config.pl in @INC (@INC contains: /usr/local/lib/perl5/5.8.4/i686-linux /usr/local/lib/perl5/5.8.4 /usr/local/lib/perl5/site_perl/5.8.4/i686-linux /usr/local/lib/perl5/site_perl/5.8.4 /usr/local/lib/perl5/site_perl .) at /www/example.com/cgi-bin/example.cgi line 64.

To this:

[Thu May 19 08:47:41 2005] [error] [MODULENAME Can't locate /www/path/goes/here//config.pl in @INC (@INC contains: /usr/local/lib/perl5/5.8.4/i686-linux /usr/local/lib/perl5/5.8.4 /usr/local/lib/perl5/site_perl/5.8.4/i686-linux /usr/local/lib/perl5/site_perl/5.8.4 /usr/local/lib/perl5/site_perl .) at /www/example.com/cgi-bin/example.cgi line 64.

Thanks in advance!

Who generates this "Can't locate" message? Normal die() messages should already be prefixed.

If for some reason it's not working (which we should figure out why) you can always override CORE::GLOBAL::die to add the prefix or it can be done via $SIG{__DIE__} override.


--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Reply via email to