Skip to content

Commit 0f0f7bb

Browse files
committed
统一日志格式
1 parent 17d65ee commit 0f0f7bb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/impl/AbstractWxMpServiceImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ public synchronized <T, E> T executeInternal(RequestExecutor<T, E> executor, Str
286286

287287
try {
288288
T result = executor.execute(uriWithAccessToken, data);
289-
this.log.debug("\n[URL]: {}\n[PARAMS]: {}\n[RESPONSE]: {}", uriWithAccessToken, data, result);
289+
this.log.debug("\n【请求地址】: {}\n【请求参数】:{}\n【响应数据】:{}", uriWithAccessToken, data, result);
290290
return result;
291291
} catch (WxErrorException e) {
292292
WxError error = e.getError();
@@ -305,12 +305,12 @@ public synchronized <T, E> T executeInternal(RequestExecutor<T, E> executor, Str
305305
}
306306

307307
if (error.getErrorCode() != 0) {
308-
this.log.error("\n[URL]: {}\n[PARAMS]: {}\n[RESPONSE]: {}", uriWithAccessToken, data, error);
308+
this.log.error("\n【请求地址】: {}\n【请求参数】:{}\n【错误信息】:{}", uriWithAccessToken, data, error);
309309
throw new WxErrorException(error);
310310
}
311311
return null;
312312
} catch (IOException e) {
313-
this.log.error("\n[URL]: {}\n[PARAMS]: {}\n[EXCEPTION]: {}", uriWithAccessToken, data, e.getMessage());
313+
this.log.error("\n【请求地址】: {}\n【请求参数】:{}\n【异常信息】:{}", uriWithAccessToken, data, e.getMessage());
314314
throw new RuntimeException(e);
315315
}
316316
}

0 commit comments

Comments
 (0)