From 69569bf7abd4465df296fa9f1382a04250f0cec5 Mon Sep 17 00:00:00 2001 From: Sergiusz Urbaniak Date: Wed, 28 Oct 2020 15:57:23 +0100 Subject: [PATCH] pkg/client: refactor to klog/v2 api --- pkg/client/api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/client/api.go b/pkg/client/api.go index 84cf7d17..df08c722 100644 --- a/pkg/client/api.go +++ b/pkg/client/api.go @@ -70,7 +70,7 @@ func (c *httpAPIClient) Do(ctx context.Context, verb, endpoint string, query url return APIResponse{}, err } - if klog.V(6) { + if klog.V(6).Enabled() { klog.Infof("%s %s %s", verb, u.String(), resp.Status) } @@ -85,7 +85,7 @@ func (c *httpAPIClient) Do(ctx context.Context, verb, endpoint string, query url } var body io.Reader = resp.Body - if klog.V(8) { + if klog.V(8).Enabled() { data, err := ioutil.ReadAll(body) if err != nil { return APIResponse{}, fmt.Errorf("unable to log response body: %v", err)