- more log.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -23,10 +23,11 @@ func init() {
|
||||
elmapi = New("f22acad55e8b11ae146ad9295e20cf4e", "RwT214gAsS", "56afff4b9ebd8a7eb532d18fa33f17be57f9b9db", false)
|
||||
|
||||
// prod
|
||||
// elmapi = New("bab2a27f99562f394b411dbb9a6214da", "KLRDcOZGrk", "1fc221f8265506531da36fb613d5f5ad673f2e9a", true)
|
||||
// elmapi = New("a530ade4a8e0b99542df0592b06575b5", "KLRDcOZGrk", "1fc221f8265506531da36fb613d5f5ad673f2e9a", true)
|
||||
}
|
||||
|
||||
func TestTest(t *testing.T) {
|
||||
q
|
||||
sugarLogger.Debug(utils.GetCurTimeStr())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user