mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-05 17:27:51 +00:00
pkg/client: refactor to klog/v2 api
This commit is contained in:
parent
523aa52367
commit
69569bf7ab
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue