Re: Apache::PerlRun flooding error log

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

From: David J Radunz
Subject: Re: Apache::PerlRun flooding error log
Date: 08:44 on 06 Apr 2005
I found a way to stop the errors/warnings within PerlRun - but your
right, were going to spend the time removing SIG completely and
implement a PerlTransHandler on the development server to turn it on
always (saves 'accidently' leaving it in the code).

Thanks man,

David

On Wed, 2005-04-06 at 01:22 -0400, Stas Bekman wrote:
> David J Radunz wrote:
> > Well, all of these scripts run under PerlRun - so I either have to make
> > that change in every one of them, and every module they load. Like, if I
> > set the SIG{__WARN__} at the top of a script and a module set it,
> > wouldn't it then be 'reset' ?
> 
> Why would any module mungle with %SIG? That's a very bad idea. It should 
> be set once at the startup by the user, normally for debug purposes and 
> never touched by the core modules.
> 
> If you still have the case where the modules you use reset %SIG, simply 
> modify PerlRun.pm to log the truncated error. Let me know if you need help 
> with that. (search for $@ and truncate it)
> 
> > David
> > 
> > On Wed, 2005-04-06 at 01:00 -0400, Stas Bekman wrote:
> > 
> >>Stas Bekman wrote:
> >>
> >>>David J Radunz wrote:
> >>>
> >>>
> >>>>Sounds great - yet obvious. I would have to do about 2 years worth of
> >>>>work to fix all of the bugs. I didn't create them either, I fix them in
> >>>>my own code - but we have so much code base. I wanted a mod_perl
> >>>>solution to overcome this issue by filtering the error.
> >>>
> >>>
> >>>If that's the case, why don't you adjust your %SIG wrappers to truncate 
> >>>the error length? It's relatively easy:
> >>>
> >>>use Carp qw(confess cluck);
> >>>$SIG{__DIE__}  = sub { die  substr Carp::longmess(@_), 0, TRUNCATE };
> >>>$SIG{__WARN__} = sub { warn substr Carp::longmess(@_), 0, TRUNCATE };
> >>
> >>Sorry, it should have been:
> >>
> >>use constant TRUNCATE => 40;
> >>use Carp ();
> >>$SIG{__DIE__}  = sub { die  substr Carp::longmess(@_), 0, TRUNCATE };
> >>$SIG{__WARN__} = sub { warn substr Carp::longmess(@_), 0, TRUNCATE };
> >>
> > 
> > 
> > This email and any files transmitted with it are confidential and intended solely for the 
> > use of the individual or entity to whom they are addressed. Please notify the sender 
> > immediately by email if you have received this email by mistake and delete this email 
> > from your system. Please note that any views or opinions presented in this email are solely
> >  those of the author and do not necessarily represent those of the organisation. 
> > Finally, the recipient should check this email and any attachments for the presence of 
> > viruses. The organisation accepts no liability for any damage caused by any virus 
> > transmitted by this email. 
> 
> 

(message missing)

Apache::PerlRun flooding error log
David J Radunz 01:10 on 06 Apr 2005

Re: Apache::PerlRun flooding error log
Stas Bekman 02:06 on 06 Apr 2005

Re: Apache::PerlRun flooding error log
David J Radunz 02:22 on 06 Apr 2005

Re: Apache::PerlRun flooding error log
Stas Bekman 04:49 on 06 Apr 2005

Re: Apache::PerlRun flooding error log
Stas Bekman 05:00 on 06 Apr 2005

Re: Apache::PerlRun flooding error log
David J Radunz 05:04 on 06 Apr 2005

Re: Apache::PerlRun flooding error log
Stas Bekman 05:22 on 06 Apr 2005

Re: Apache::PerlRun flooding error log
David J Radunz 08:44 on 06 Apr 2005

Generated at 14:43 on 11 Apr 2005 by mariachi v0.52