Commit 48962b2a authored by Marek Grabowski's avatar Marek Grabowski

Merge pull request #22013 from bprashanth/log_liveness

Log response body when http probe fails.
parents df234d83 fcc7e99b
...@@ -78,6 +78,6 @@ func DoHTTPProbe(url *url.URL, headers http.Header, client HTTPGetInterface) (pr ...@@ -78,6 +78,6 @@ func DoHTTPProbe(url *url.URL, headers http.Header, client HTTPGetInterface) (pr
glog.V(4).Infof("Probe succeeded for %s, Response: %v", url.String(), *res) glog.V(4).Infof("Probe succeeded for %s, Response: %v", url.String(), *res)
return probe.Success, body, nil return probe.Success, body, nil
} }
glog.V(4).Infof("Probe failed for %s, Response: %v", url.String(), *res) glog.V(4).Infof("Probe failed for %s with request headers %v, response body: %v", url.String(), headers, body)
return probe.Failure, fmt.Sprintf("HTTP probe failed with statuscode: %d", res.StatusCode), nil return probe.Failure, fmt.Sprintf("HTTP probe failed with statuscode: %d", res.StatusCode), nil
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment