Permalink
Browse files

per-line timestamping, and elapsed time at end... helps with debugging

  • Loading branch information...
Jake Maul
Jake Maul committed Jun 12, 2013
1 parent e70fb4f commit d3be682934ff448457c6538af71d71d7ef29a5fe
Showing with 4 additions and 1 deletion.
  1. +4 −1 sentry/sentry.pl
View
@@ -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;
@@ -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
@@ -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.