Re: Apache Error Log Format

[prev] [thread] [next] [Date index for 2005/06/04]

From: Stas Bekman
Subject: Re: Apache Error Log Format
Date: 11:44 on 04 Jun 2005
[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:stas@xxxxxx.xxx http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Apache Error Log Format
Daniel B. Hemmerich 12:36 on 31 May 2005

Re: Apache Error Log Format
Jonathan Vanasco 20:51 on 31 May 2005

Re: Apache Error Log Format
Daniel B. Hemmerich 21:19 on 31 May 2005

Re: Apache Error Log Format
Arshavir Grigorian 17:48 on 01 Jun 2005

Re: Apache Error Log Format
Daniel B. Hemmerich 20:52 on 01 Jun 2005

Re: Apache Error Log Format
Stas Bekman 11:44 on 04 Jun 2005

Generated at 20:12 on 05 Jun 2005 by mariachi v0.52