Log response body when http probe fails.

This commit is contained in:
Prashanth Balasubramanian 2016-02-25 13:29:06 -08:00
parent df234d83cd
commit fcc7e99b83

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
}