From a9ac648cf6b5fc2fd4b93140582440f9e3a8cfa2 Mon Sep 17 00:00:00 2001 From: Ieva Date: Wed, 1 May 2024 17:42:05 +0100 Subject: [PATCH] Chore: Improve some confusing logs (#87185) improve some confusing logs --- pkg/components/loki/lokihttp/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/components/loki/lokihttp/client.go b/pkg/components/loki/lokihttp/client.go index 4f64441eb74..ff2418b9973 100644 --- a/pkg/components/loki/lokihttp/client.go +++ b/pkg/components/loki/lokihttp/client.go @@ -321,7 +321,7 @@ func (c *client) sendBatch(tenantID string, batch *batch) { } if err != nil { - c.logger.Error("final error sending batch", "status", status, "error") + c.logger.Error("final error sending batch", "status", status) c.metrics.droppedBytes.WithLabelValues(c.cfg.URL.Host).Add(bufBytes) c.metrics.droppedEntries.WithLabelValues(c.cfg.URL.Host).Add(float64(entriesCount)) } @@ -351,7 +351,7 @@ func (c *client) send(ctx context.Context, tenantID string, buf []byte) (int, er defer func() { err := resp.Body.Close() if err != nil { - c.logger.Error("closing response body", "error", err) + c.logger.Error("failed to close the response body", "error", err) } }()