Re: logging at startup

[prev] [thread] [next] [Date index for 2004/11/16]

From: Arshavir Grigorian
Subject: Re: logging at startup
Date: 00:07 on 16 Nov 2004
Perrin Harkins wrote:

>On Wed, 2004-11-10 at 16:09, Arshavir Grigorian wrote:
>  
>
>>How can I write my code to know whether it is in a request and only if 
>>so, output the standard error page.
>>    
>>
>
>You should be able to use $Apache::Server::Starting and
>$Apache::Server::ReStarting for this.  There may be a better way.
>
>  
>
>>On a separate note, why would one even bother with 
>>Apache::Log->log_error? instead of just using CGI::Carp (for 
>>simple/basic error loggin that is
>>    
>>
>
>Apache::Log->log_error sends the message to the error_log, not to the
>browser.  That's what you want, unless you are in development.  Is this
>mod_perl 2 that you're using?  If it is, you can use the server object
>instead of the request object, and avoid the whole issue of checking for
>startup.
>
>For other reasons to avoid CGI::Carp, see
>http://perl.apache.org/docs/general/perl_reference/perl_reference.html#Exception_Handling_for_mod_perl
>
>- Perrin
>  
>
Following the example My::Exception class I created (cut and pasted) it 
into a local class, which I am use-ing in a BEGIN block in my startup 
file. However, on startup I receive the following warning:

Prototype mismatch: sub CORE::GLOBAL::die: none vs (@) at 
/usr/local/apache2/conf/startup.pl line 28

I am using Perl 5.8.4 on Gentoo Sparc.

I am trying to write an error handler to log the stacktrace, display a 
custom error page on the user's browser and terminate the request. Could 
someone, please, show a skeleton of how to extend the My::Exception 
class to do this?

Any comments/insights would be greatly appreciated.



Arshavir




        -- 
        Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

(message missing)

logging at startup
Arshavir Grigorian 15:11 on 10 Nov 2004

Re: logging at startup
Perrin Harkins 20:21 on 10 Nov 2004

Re: logging at startup
Arshavir Grigorian 21:09 on 10 Nov 2004

Re: logging at startup
Tom Schindl 21:37 on 10 Nov 2004

Re: logging at startup
Arshavir Grigorian 14:57 on 12 Nov 2004

Re: logging at startup
Perrin Harkins 21:42 on 10 Nov 2004

segmentation fault and core dump
Ian Moon 23:17 on 10 Nov 2004

Re: segmentation fault and core dump
Stas Bekman 23:56 on 10 Nov 2004

Re: logging at startup
Arshavir Grigorian 14:56 on 12 Nov 2004

Re: logging at startup
Arshavir Grigorian 00:07 on 16 Nov 2004

Re: segmentation fault and core dump
Ian Moon 01:15 on 11 Nov 2004

Re: segmentation fault and core dump
Stas Bekman 03:41 on 11 Nov 2004

Generated at 11:26 on 21 Dec 2004 by mariachi v0.52