On Thu 26 Feb 2009, Clinton Gormley wrote: > > Why don't you do that in a <Perl> block? > > How is this different from doing it in the startup.pl file?
Yes, I see, the 2nd run of the <Perl> code doesn't have STDERR either. So, you can open a startup logfile in perl and override CORE::GLOBAL::warn/die or install a $SIG{__WARN__/__DIE__} handler. Or even open that logfile at start of your startup.pl on file descriptor 2 and close it at the end. <Perl> use Apache2::ServerUtil; if( Apache2::ServerUtil::restart_count>1 ) { open my $olderr, '>&', \*STDERR; close STDERR; open STDERR, '>', '/tmp/myerr'; # initialize your app here warn "huhu"; print STDERR "haha"; # end of init close STDERR; open STDERR, '>&', $olderr; } </Perl> Torsten -- Need professional mod_perl support? Just hire me: torsten.foert...@gmx.net