- use Infof instead of Errorf when http code is not 200 (to avoid many ebai errors)

This commit is contained in:
gazebo
2019-02-21 09:52:00 +08:00
parent fca8851475
commit 3ee0ee47bc

View File

@@ -125,7 +125,7 @@ func AccessPlatformAPIWithRetry(client *http.Client, handleRequest func() *http.
defer response.Body.Close()
if response.StatusCode != 200 {
if bodyData, err := ioutil.ReadAll(response.Body); err == nil {
baseapi.SugarLogger.Errorf("AccessPlatformAPIWithRetry:%s HTTP code is:%d, url:%v, request:%v, response:%s", trackID, response.StatusCode, request.URL, getClonedData(request.URL, savedBuf), string(bodyData))
baseapi.SugarLogger.Infof("AccessPlatformAPIWithRetry:%s HTTP code is:%d, url:%v, request:%v, response:%s", trackID, response.StatusCode, request.URL, getClonedData(request.URL, savedBuf), string(bodyData))
} else {
baseapi.SugarLogger.Errorf("AccessPlatformAPIWithRetry:%s HTTP code is:%d, url:%v, request:%v", trackID, response.StatusCode, request.URL, getClonedData(request.URL, savedBuf))
}