Cees Hek wrote:
>
>
> 
> With that you could easily write a signal handler.
> 
> $SIG{__WARN__} = sub { MyApp->log->warn(shift) };

Is anyone using a construct like this? Any caveats? 

I've just been reading about all the 'gotchas' with using $SIG{__DIE__}
handlers if you aren't careful. I found less explicit warnings about using
$SIG{__WARN__}, but thought I should check before I consider putting it into
production. 

My goal is to use LogDispatch to redirect application warnings to their own
error log. 

Thanks!

   Mark



---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to