httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Turner <>
Subject Re: Tracking Down an Error
Date Mon, 05 Aug 2002 02:35:30 GMT
On Sun, 04 Aug 2002 11:02:48 -0700, Andy Cutright wrote:

>also, i'd follow this other guy's advice about adding logging to the 
>scripts. and $0 is the perl variable for the  program name (rather than 
>"$script-name". i _do_ have the perl book in front of me ;) CAVEAT EMPTOR:
>open LOG_FILE, ">>/var/log/apache/cgi.log";
>print LOG_FIle "$0 called\n";
>#### script..
>print LOG_FILE "$0 finished\n";
>close LOG_FILE;

Out of curiosity, and because I still don't have the book in front of
me, would it not be a GoodThing (tm) to close the file explicitly after
each write (print)?  It is possible (likely?) that the script will be
killed manually if it is the doer of dirty deeds.
It ain't so much what you don't know that gets you in trouble---
it's what you do know that ain't so.--unk

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message