diff --git a/pkg/credentialprovider/config.go b/pkg/credentialprovider/config.go index 00a5fa90608..8b8ef911518 100644 --- a/pkg/credentialprovider/config.go +++ b/pkg/credentialprovider/config.go @@ -203,7 +203,7 @@ func ReadURL(url string, client *http.Client, header *http.Header) (body []byte, defer resp.Body.Close() if resp.StatusCode != http.StatusOK { - klog.V(2).Infof("body of failing http response: %v", resp.Body) + klog.V(2).InfoS("Failed to read URL", "statusCode", resp.StatusCode, "URL", url) return nil, &HTTPError{ StatusCode: resp.StatusCode, URL: url, diff --git a/staging/src/k8s.io/legacy-cloud-providers/gce/gcpcredential/credentialutil.go b/staging/src/k8s.io/legacy-cloud-providers/gce/gcpcredential/credentialutil.go index 6f13eec0791..55a4988b86f 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/gce/gcpcredential/credentialutil.go +++ b/staging/src/k8s.io/legacy-cloud-providers/gce/gcpcredential/credentialutil.go @@ -60,7 +60,7 @@ func ReadURL(url string, client *http.Client, header *http.Header) (body []byte, defer resp.Body.Close() if resp.StatusCode != http.StatusOK { - klog.V(2).Infof("body of failing http response: %v", resp.Body) + klog.V(2).InfoS("Failed to read URL", "statusCode", resp.StatusCode, "URL", url) return nil, &HTTPError{ StatusCode: resp.StatusCode, URL: url,