Skip to content

Commit

Permalink
fix: log giveUp=false at level=info
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Collins <[email protected]>
  • Loading branch information
alexec committed Oct 7, 2021
1 parent 130a218 commit d5259ea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion runner/sidecar/sources.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,13 @@ func connectSources(ctx context.Context, process func(context.Context, []byte) e
return nil
}
giveUp := backoff.Steps <= 0
logger.Error(err, "failed to send process message", "source", sourceName, "backoffSteps", backoff.Steps, "giveUp", giveUp)
logger := logger.WithValues("source", sourceName, "backoffSteps", backoff.Steps, "giveUp", giveUp)
if giveUp {
logger.Error(err, "failed to send process message")
errorsCounter.WithLabelValues(sourceName, fmt.Sprint(replica)).Inc()
return err
} else {
logger.Info("failed to send process message", "err", err.Error())
}
time.Sleep(backoff.Step())
}
Expand Down

0 comments on commit d5259ea

Please sign in to comment.