From a2ab85dac7cc4efc4a52fe0265a022a8a14a3281 Mon Sep 17 00:00:00 2001 From: kruskall <99559985+kruskall@users.noreply.github.com> Date: Mon, 10 Jun 2024 17:20:16 +0200 Subject: [PATCH] fix: avoid gotestsum import in libbeat es output (#39835) gotestsum is being imported causing downstream apps to include it in the dependency tree. Drop the import and use the client logger. --- libbeat/outputs/elasticsearch/client.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libbeat/outputs/elasticsearch/client.go b/libbeat/outputs/elasticsearch/client.go index e05c4e0b261f..933d04c789ca 100644 --- a/libbeat/outputs/elasticsearch/client.go +++ b/libbeat/outputs/elasticsearch/client.go @@ -26,7 +26,6 @@ import ( "time" "go.elastic.co/apm/v2" - "gotest.tools/gotestsum/log" "github.com/elastic/beats/v7/libbeat/beat" "github.com/elastic/beats/v7/libbeat/beat/events" @@ -433,7 +432,7 @@ func (client *Client) bulkCollectPublishFails(bulkResult bulkResult) ([]publishe if client.applyItemStatus(events[i], itemStatus, itemMessage, &stats) { eventsToRetry = append(eventsToRetry, events[i]) - log.Debugf("Bulk item insert failed (i=%v, status=%v): %s", i, itemStatus, itemMessage) + client.log.Debugf("Bulk item insert failed (i=%v, status=%v): %s", i, itemStatus, itemMessage) } }