diff --git a/business/jxutils/tasks/configrefresh.go b/business/jxutils/tasks/configrefresh.go index 457cedbdd..b827c305a 100644 --- a/business/jxutils/tasks/configrefresh.go +++ b/business/jxutils/tasks/configrefresh.go @@ -146,9 +146,7 @@ func RefreshWeixin2Token() (err error) { globals.SugarLogger.Errorf("RefreshWeixin2Token RefreshToken failed with error:%v", err) } } else { - tokenInfo := getWX2TokenFromRemote(api.WeixinMiniAPI2.CBGetToken()) - globals.SugarLogger.Debugf("=================tokenInfo=1== := %s", utils.Format4Output(tokenInfo, false)) - if tokenInfo != nil { + if tokenInfo := getWX2TokenFromRemote(api.WeixinMiniAPI2.CBGetToken()); tokenInfo != nil { expireTimeStr = utils.Time2Str(time.Now().Add(-weixinTokenExpires)) token = tokenInfo.Token } @@ -362,7 +360,6 @@ func PollingRemotEvent(remoteURL string, waitSecond int, params map[string]inter time.Sleep(errRefreshGap) } } - globals.SugarLogger.Debugf("tokenInfo========= :%s", utils.Format4Output(tokenInfo, false)) return tokenInfo } @@ -376,9 +373,7 @@ func getWXTokenFromRemote(oldToken string) (tokenInfo *syseventhub.TokenInfo) { } func getWX2TokenFromRemote(oldToken string) (tokenInfo *syseventhub.TokenInfo) { - globals.SugarLogger.Debugf("=========bool : %s", utils.Format4Output(!globals.IsMainProductEnv() && globals.GetWeixinTokenKey != "" && globals.GetWeixinTokenURL != "", false)) if !globals.IsMainProductEnv() && globals.GetWeixinTokenKey != "" && globals.GetWeixinTokenURL != "" { - globals.SugarLogger.Debugf("=========globals.GetWeixin2TokenURL : %s", utils.Format4Output(globals.GetWeixin2TokenURL, false)) tokenInfo = PollingRemotEvent(globals.GetWeixin2TokenURL, 0, map[string]interface{}{ "oldToken": oldToken, })