Merge pull request #104240 from feeltimeQ/fix/Log_attempts_to_output_resp.Body

fix Log attempts to output resp.Body #104184
This commit is contained in:
Kubernetes Prow Robot 2021-09-07 05:33:15 -07:00 committed by GitHub
commit f12d73304d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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,

View File

@ -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,