- more log.

This commit is contained in:
gazebo
2018-06-29 17:06:34 +08:00
parent 6bcdf33b46
commit 3a019fcba8
2 changed files with 4 additions and 2 deletions

View File

@@ -62,6 +62,7 @@ type payload struct {
}
func New(token, appKey, secret string, isProd bool, config ...*platformapi.APIConfig) *API {
baseapi.SugarLogger.Debugf("token=%v, appKey=%v, secret=%v", token, appKey, secret)
curConfig := platformapi.DefAPIConfig
if len(config) > 0 {
curConfig = *config[0]
@@ -175,7 +176,7 @@ func (a *API) AccessAPI(action string, params map[string]interface{}) (retVal *R
return platformapi.ErrLevelSuccess, nil
}
code := errinfoMap["code"].(string)
baseapi.SugarLogger.Warnf("response business code is not ok, data:%v, code:%v", jsonResult1, code)
baseapi.SugarLogger.Warnf("response business code is not ok, data:%v, code:%v, payload:%v", jsonResult1, code, pl)
newErr := utils.NewErrorCode(errinfoMap["message"].(string), code)
if code == "EXCEED_LIMIT" {
return platformapi.ErrLevelExceedLimit, newErr