From e85929a889522fedba1ff804036603fa254f5fff Mon Sep 17 00:00:00 2001 From: Dmytro Chukmasov Date: Thu, 13 May 2021 16:02:00 +0300 Subject: [PATCH] removing spamming EOF logging entry from logs Signed-off-by: Dmytro Chukmasov --- flyte/commands.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/flyte/commands.go b/flyte/commands.go index f0c756c..593cc66 100644 --- a/flyte/commands.go +++ b/flyte/commands.go @@ -20,6 +20,7 @@ import ( "fmt" "github.com/ExpediaGroup/flyte-client/client" "github.com/HotelsDotCom/go-logger" + "strings" "time" ) @@ -57,7 +58,9 @@ func (p pack) getNextAction() *client.Action { if _, ok := err.(client.NotFoundError); ok { logger.Fatal("Pack not found while polling for actions. Exiting.") } - logger.Infof("could not take action: %s", err) + if !strings.HasSuffix(strings.TrimSpace(err.Error()), "EOF") { + logger.Infof("could not take action: %s", err) + } } if a == nil || err != nil { time.Sleep(p.pollingFrequency)