diff --git a/platformapi/platformapi.go b/platformapi/platformapi.go index ac3be644..b8d5b4dd 100644 --- a/platformapi/platformapi.go +++ b/platformapi/platformapi.go @@ -130,7 +130,7 @@ func AccessPlatformAPIWithRetry(client *http.Client, handleRequest func() *http. 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)) } else { - baseapi.SugarLogger.Errorf("AccessPlatformAPIWithRetry:%s HTTP code is:%d, url:%v, request:%v, ioutil.ReadAll failed with error:%v", trackID, response.StatusCode, request.URL, getClonedData(request.URL, savedBuf), err) + baseapi.SugarLogger.Errorf("AccessPlatformAPIWithRetry:%s ioutil.ReadAll failed, HTTP code is:%d, url:%v, request:%v, error:%v", trackID, response.StatusCode, request.URL, getClonedData(request.URL, savedBuf), err) } return ErrHTTPCodeIsNot200 } @@ -140,7 +140,7 @@ func AccessPlatformAPIWithRetry(client *http.Client, handleRequest func() *http. ) bodyData, err := ioutil.ReadAll(response.Body) if err != nil { - baseapi.SugarLogger.Errorf("AccessPlatformAPIWithRetry:%s url:%v, request:%v failed with error:%v", trackID, request.URL, getClonedData(request.URL, savedBuf), err) + baseapi.SugarLogger.Errorf("AccessPlatformAPIWithRetry:%s ioutil.ReadAll failed, url:%v, request:%v, error:%v", trackID, request.URL, getClonedData(request.URL, savedBuf), err) } else if err = utils.TryUnmarshalUseNumber(bodyData, &bodyMap); err != nil { const maxOutputLen = 200 bodyDataLen := len(bodyData) @@ -148,7 +148,7 @@ func AccessPlatformAPIWithRetry(client *http.Client, handleRequest func() *http. if bodyDataLen > maxOutputLen { bodyData2 = bodyData2[:maxOutputLen] } - baseapi.SugarLogger.Infof("AccessPlatformAPIWithRetry:%s url:%v, request:%v failed with error:%v, bodyData:%s", trackID, request.URL, getClonedData(request.URL, savedBuf), err, string(bodyData2)) + baseapi.SugarLogger.Infof("AccessPlatformAPIWithRetry:%s TryUnmarshalUseNumber failed, url:%v, request:%v, error:%v, bodyData:%s", trackID, request.URL, getClonedData(request.URL, savedBuf), err, string(bodyData2)) } if err != nil {