Fix it again, again.

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

View File

@@ -4971,9 +4971,9 @@ sub start_online_logging {
);
};
if ( my $e = $EVAL_ERROR ) {
if ( ++$n_errors < 10 ) {
if ( ++$n_errors <= 10 ) {
warn "Error sending log entry to API: $e";
if ( $n_errors >= 10 ) {
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 "

View File

@@ -183,9 +183,9 @@ sub start_online_logging {
};
if ( my $e = $EVAL_ERROR ) {
# Safegaurd: don't spam the agent log file with errors.
if ( ++$n_errors < 10 ) {
if ( ++$n_errors <= 10 ) {
warn "Error sending log entry to API: $e";
if ( $n_errors >= 10 ) {
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 "