update 打印日志

This commit is contained in:
jsowell
2026-05-29 15:38:46 +08:00
parent 5edb2ac5a3
commit 7c25ee6852
4 changed files with 5 additions and 7 deletions

View File

@@ -7,7 +7,7 @@
<!-- 日志最大的历史 90天 --> <!-- 日志最大的历史 90天 -->
<property name="maxHistory" value="90"/> <property name="maxHistory" value="90"/>
<!-- 控制台输出 --> <!-- 控制台输出 -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender"> <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder> <encoder>
<pattern>${log.pattern}</pattern> <pattern>${log.pattern}</pattern>

View File

@@ -1,6 +1,5 @@
package com.jsowell.adapay.config; package com.jsowell.adapay.config;
import com.alibaba.fastjson2.JSON;
import com.huifu.adapay.Adapay; import com.huifu.adapay.Adapay;
import com.huifu.adapay.model.MerConfig; import com.huifu.adapay.model.MerConfig;
import com.jsowell.adapay.factory.AdapayConfigFactory; import com.jsowell.adapay.factory.AdapayConfigFactory;
@@ -77,8 +76,7 @@ public class InitializeAdapayConfig implements CommandLineRunner {
merConfig.setApiMockKey(mockApiKey); merConfig.setApiMockKey(mockApiKey);
merConfig.setRSAPrivateKey(rsaPrivateKey); merConfig.setRSAPrivateKey(rsaPrivateKey);
Adapay.initWithMerConfig(merConfig); Adapay.initWithMerConfig(merConfig);
log.info("汇付配置初始化成功debug:{}, prodMode:{}, apiKey:{}, mockApiKey:{}, rsaPrivateKey:{}" log.info("汇付配置初始化成功debug:{}, prodMode:{}", DEBUG_FLAG, PROD_MODE);
, DEBUG_FLAG, PROD_MODE, JSOWELL_API_KEY, JSOWELL_MOCK_API_KEY, JSOWELL_RSA_PRIVATE_KEY);
} }
/** /**
@@ -118,6 +116,6 @@ public class InitializeAdapayConfig implements CommandLineRunner {
// 将商户A和B的商户配置放入本地缓存 // 将商户A和B的商户配置放入本地缓存
Adapay.initWithMerConfigs(configPathMap); Adapay.initWithMerConfigs(configPathMap);
log.info("汇付多商户配置初始化成功,configPathMap:{}", JSON.toJSONString(configPathMap)); log.info("汇付多商户配置初始化成功,merchantCount:{}", configPathMap.size());
} }
} }

View File

@@ -161,7 +161,7 @@ public class WxAppletRemoteService {
"&js_code=%s" + "&js_code=%s" +
"&grant_type=authorization_code"; "&grant_type=authorization_code";
log.info("appid:{},appscrect:{}", WeixinLoginProperties.WX_OPEN_APP_ID, WeixinLoginProperties.WX_OPEN_APP_SECRET); log.info("微信登录获取openid, appid:{}", WeixinLoginProperties.WX_OPEN_APP_ID);
String accessTokenUrl = String.format(baseAccessTokenUrl, WeixinLoginProperties.WX_OPEN_APP_ID, WeixinLoginProperties.WX_OPEN_APP_SECRET, code); String accessTokenUrl = String.format(baseAccessTokenUrl, WeixinLoginProperties.WX_OPEN_APP_ID, WeixinLoginProperties.WX_OPEN_APP_SECRET, code);

View File

@@ -121,7 +121,7 @@ public class HttpUtils {
String jsonResult = EntityUtils.toString(httpEntity); String jsonResult = EntityUtils.toString(httpEntity);
return JSON.readValue(jsonResult, HashMap.class); return JSON.readValue(jsonResult, HashMap.class);
} else { } else {
log.error("微信支付错误信息:{}, body:{}", EntityUtils.toString(httpEntity), body); log.error("微信支付错误信息:{}", EntityUtils.toString(httpEntity));
} }
} catch (Exception e) { } catch (Exception e) {
log.error("HttpUtils.doPostWexin error", e); log.error("HttpUtils.doPostWexin error", e);