Fix it again--the pitfalls of working so long and late.

This commit is contained in:
Daniel Nichter
2013-06-16 23:06:06 -07:00
parent c2af32cd0f
commit 4f3fa288b1
2 changed files with 14 additions and 16 deletions

View File

@@ -4971,15 +4971,14 @@ sub start_online_logging {
);
};
if ( my $e = $EVAL_ERROR ) {
if ( $n_errors > 10 ) {
my $ts = ts(time, 1); # 1=UTC
warn "$ts WARNING $n_errors consecutive errors, no more "
. "error messages will be printed until log entries "
. "are sent successfully again.\n";
}
else {
if ( ++$n_errors < 10 ) {
warn "Error sending log entry to API: $e";
$n_errors++;
if ( $n_errors >= 10 ) {
my $ts = ts(time, 1); # 1=UTC
warn "$ts WARNING $n_errors consecutive errors, no more "
. "error messages will be printed until log entries "
. "are sent successfully again.\n";
}
}
}
else {