Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Re: tracking files

by 2501 (Pilgrim)
on Dec 04, 2000 at 00:56 UTC ( [id://44705]=note: print w/replies, xml ) Need Help??


in reply to LogScripts.pm
in thread tracking files

Thank you all!
++'s around for all great answers!
BBQ : I agree with you, but switching is not an option. Got to deal with the tools you are given sometimes.

$code_or_die: Very informative! I will definitely check out the software.
Fastolfe: Perfect! I think that was exactly what I was looking for. I couldn't use $0 because the difference between 90% of the scripts is the script path (and thats about it) so i tweaked it abit to the following:
package LogScripts; # use Time::HiRes qw{ time }; use File::Spec::Functions qw(rel2abs); my $started; my $path; BEGIN { open(F, ">>c:\\scripts.log"); $path = rel2abs($0); $started = time(); print F localtime(time) . " $ENV{REMOTE_ADDR} - Starting $path\n"; } END { my $elapsed = time() - $started; print F localtime(time) . " $ENV{REMOTE_ADDR} - Stopping $path ($el +apsed seconds)"; close(F); }
Once again,
thank you all:) I learned a good deal from everyone.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://44705]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-20 00:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found