Merge pull request #22013 from bprashanth/log_liveness

Log response body when http probe fails.
This commit is contained in:
Marek Grabowski 2016-02-25 23:57:45 +01:00
commit 48962b2a11

View File

@ -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)
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
}