package LogScripts; # If you want high-res timekeeping: # use Time::HiRes qw{ time }; my $started; BEGIN { open(F, ">>/logdir/scripts.log"); print F localtime(time) . " $ENV{REMOTE_ADDR} - Starting $0\n"; $started = time(); } END { my $elapsed = time() - $started; print F localtime(time) . " $ENV{REMOTE_ADDR} - Stopping $0 ($elaps +ed seconds)\n"; close(F); }
In reply to LogScripts.pm
by Fastolfe
in thread tracking files
by 2501
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |