Re: Apache::PerlRun flooding error log
[prev]
[thread]
[next]
[Date index for 2005/04/06]
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 };
You don't need to touch mod_perl.
> On Tue, 2005-04-05 at 22:06 -0400, Stas Bekman wrote:
>
>>David J Radunz wrote:
>>
>>>Heya All,
>>>
>>> I have an issue at the moment where if there is an error/warning in my
>>>PerlRun script/module then the error/warning is printed as well as the
>>>entire contents of the script being eval'ed. This only occurs when a
>>>string is evaled and Carp stack trace is on.
>>
>>David, why not fix errors and warnings and have nothing logged at all?
>>
>>Why do you set:
>>
>>$SIG{__DIE__} = \&Carp::confess;
>>$SIG{__WARN__} = \&Carp::cluck;
>>
>>Those are used for development, not production env.
>>
>>As you've figured it's how perl works, mod_perl doesn't do anything
>>special about it.
--
__________________________________________________________________
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
 |
(message missing)
|