From 186ff75291e9fdadc500972c2b42fb142e05031b Mon Sep 17 00:00:00 2001 From: Tapajit Chandra Paul Date: Wed, 7 Aug 2024 12:36:30 +0600 Subject: [PATCH] Update log verbosity level Signed-off-by: Tapajit Chandra Paul --- druid/client.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/druid/client.go b/druid/client.go index f7763e40..c4d12cea 100644 --- a/druid/client.go +++ b/druid/client.go @@ -20,11 +20,11 @@ import ( "bytes" "encoding/json" "fmt" + "github.com/hashicorp/go-retryablehttp" "log" "time" druidgo "github.com/grafadruid/go-druid" - "github.com/hashicorp/go-retryablehttp" "github.com/pkg/errors" "k8s.io/klog/v2" health "kmodules.xyz/client-go/tools/healthchecker" @@ -198,7 +198,7 @@ func CheckDBReadWriteAccess(druidCoordinatorsClient *Client, druidBrokersClient if err != nil { return err, false } - klog.Info("Successfully updated coordinators config to stop waiting before deleting segment") + klog.V(5).Info("Successfully updated coordinators config to stop waiting before deleting segment") oldData = DruidHealthDataZero newData = DruidHealthDataOne } @@ -321,7 +321,7 @@ func (c *Client) SubmitTaskRecurrently(taskType DruidTaskType, dataSource string return err } if taskStatus { - klog.Info("Task successful") + klog.V(5).Info("Task successful") return nil } time.Sleep(6 * time.Second) @@ -438,9 +438,8 @@ func (c *Client) CheckTaskStatus(taskID string) (bool, error) { } func (c *Client) checkDBReadAccess(oldData string) error { - klog.Info("waiting for the segments to be available for query...") - for i := 0; i < 5; i++ { + klog.V(5).Info("waiting for the segments to be available for query...") time.Sleep(6 * time.Second) data, err := c.GetData() @@ -449,7 +448,7 @@ func (c *Client) checkDBReadAccess(oldData string) error { return err } if data != oldData { - klog.Info("successfully read ingested data") + klog.V(5).Info("successfully read ingested data") return nil } }