in reply to Running with warnings on a remote server
It's not perfect, and race conditions exist. But, it works well enough for my needs -- I'm mainly concerned with just redirecting the errors so I don't get the evil 500, not so much with keeping track of the errors.# TOP OF SCRIPT use File::Basename; my ($bname, $bpath, $bsuffix) = fileparse($0,'.pl','.cgi'); my $LOGFILE = "errors/$bname.txt"; if (-s $LOGFILE > 10000) { unlink $LOGFILE; } open (STDERR, ">>$LOGFILE") or die "Couldn't open script log: $!\n";
|
|---|