bug
jiangqs
2023-08-28 e153b340f4371ea7bbeb3009a382837ffd60a4b9
ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/aspect/LogAspect.java
@@ -114,13 +114,14 @@
            getControllerMethodDescription(joinPoint, controllerLog, operLog, jsonResult);
            // 设置消耗时间
            operLog.setCostTime(System.currentTimeMillis() - TIME_THREADLOCAL.get());
            log.info("日志打印"+operLog.toString());
            // 保存数据库
            asyncLogService.saveSysLog(operLog);
        }
        catch (Exception exp)
        {
            // 记录本地异常日志
            log.error("异常信息:{}", exp.getMessage());
            log.error("日志异常信息:{}", exp.getMessage());
            exp.printStackTrace();
        }
        finally
@@ -155,7 +156,7 @@
        // 是否需要保存response,参数和值
        if (log.isSaveResponseData() && StringUtils.isNotNull(jsonResult))
        {
            operLog.setJsonResult(StringUtils.substring(JSON.toJSONString(jsonResult), 0, 2000));
            operLog.setJsonResult(StringUtils.substring(JSON.toJSONString(jsonResult), 0, 1000));
        }
    }