Skip to content

Commit

Permalink
per-line timestamping, and elapsed time at end... helps with debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake Maul committed Jun 12, 2013
1 parent e70fb4f commit d3be682
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sentry/sentry.pl
Expand Up @@ -4,6 +4,7 @@
# regions and then determine how good we are at this.

use locale;
use POSIX;
use DBI;
use Data::Dumper;
use LWP;
Expand Down Expand Up @@ -252,7 +253,7 @@ sub log_this {
} else {
$filepath =~ s@:lang@en-US@;
}
log_this "Checking $filepath... ";
log_this "[" . strftime("%F %T %z", localtime) . "] $filepath... ";
my $req = HTTP::Request->new(HEAD => $mirror->{baseurl} . $filepath);

# allow 1 redirect
Expand All @@ -276,4 +277,6 @@ sub log_this {
# content-type == text/plain hack here for Mac dmg's
}
$log_sth->execute($start_timestamp, $mirror->{id}, '1', $mirror->{rating}, $output);

log_this "Finished. Elapsed time: " . (time - $start_timestamp) . ".\n";
}

0 comments on commit d3be682

Please sign in to comment.