Print certain log messages once per error (#17484)

This commit is contained in:
Kaan Kabalak
2023-06-24 20:29:13 -07:00
committed by GitHub
parent 1f8b9b4bd5
commit 21fbe88e1f
15 changed files with 31 additions and 31 deletions

View File

@@ -77,7 +77,7 @@ func readKeyEtcd(ctx context.Context, client *etcd.Client, key string) ([]byte,
defer cancel()
resp, err := client.Get(timeoutCtx, key)
if err != nil {
logger.LogIf(ctx, err)
logger.LogOnceIf(ctx, err, "etcd-retrieve-keys")
return nil, etcdErrToErr(err, client.Endpoints())
}
if resp.Count == 0 {