Merge branch 'refs/heads/REQ-2324' into feature/merged_all_req

This commit is contained in:
yangqicheng 2024-05-30 17:39:01 +08:00
commit 58b2ed9022

View File

@ -68,11 +68,18 @@ public class ErrorReportAspect implements Ordered {
Object result = joinPoint.proceed();
watch.stop();
String params = "";
String resultStr = "";
Object[] args = joinPoint.getArgs();
if (args != null && args.length > 0) {
params = Arrays.stream(args).map(JSONUtil::toJsonStr).collect(Collectors.joining(","));
try {
params = Arrays.stream(args).map(JSONUtil::toJsonStr).collect(Collectors.joining(","));
resultStr = JSONUtil.toJsonStr(result);
} catch (Exception e) {
params = "参数转换JSON字符串异常:" + e.getMessage();
resultStr = "参数转换JSON字符串异常:" + e.getMessage();
}
}
log.info("StopWatch '{}',params:{},result:{}: running time = {} 's", watch.getLastTaskName(), watch.getTotalTimeSeconds(), params, JSONUtil.toJsonStr(result));
log.info("StopWatch '{}',params:{},result:{}: running time = {} 's", watch.getLastTaskName(), watch.getTotalTimeSeconds(), params, resultStr);
if (!signature.toShortString().contains("ExtAxApiLogServiceImpl")) {
String type = getType(joinPoint);