update - REQ-2324-修复日志输出报错问题
This commit is contained in:
parent
b1e5e0b798
commit
7a3efea30d
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user