From 41240fc415779c4e43e3856410fc8dd466c01077 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期四, 14 十一月 2024 16:21:56 +0800 Subject: [PATCH] update 优化 将Log记录参数长度扩充为5000更符合实际需求 --- ruoyi-common/ruoyi-common-log/src/main/java/org/dromara/common/log/aspect/LogAspect.java | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ruoyi-common/ruoyi-common-log/src/main/java/org/dromara/common/log/aspect/LogAspect.java b/ruoyi-common/ruoyi-common-log/src/main/java/org/dromara/common/log/aspect/LogAspect.java index 4c6c1a4..df9e067 100644 --- a/ruoyi-common/ruoyi-common-log/src/main/java/org/dromara/common/log/aspect/LogAspect.java +++ b/ruoyi-common/ruoyi-common-log/src/main/java/org/dromara/common/log/aspect/LogAspect.java @@ -100,7 +100,7 @@ if (e != null) { operLog.setStatus(BusinessStatus.FAIL.ordinal()); - operLog.setErrorMsg(StringUtils.substring(e.getMessage(), 0, 2000)); + operLog.setErrorMsg(StringUtils.substring(e.getMessage(), 0, 5000)); } // 璁剧疆鏂规硶鍚嶇О String className = joinPoint.getTarget().getClass().getName(); @@ -146,7 +146,7 @@ } // 鏄惁闇�瑕佷繚瀛榬esponse锛屽弬鏁板拰鍊� if (log.isSaveResponseData() && ObjectUtil.isNotNull(jsonResult)) { - operLog.setJsonResult(StringUtils.substring(JsonUtils.toJsonString(jsonResult), 0, 2000)); + operLog.setJsonResult(StringUtils.substring(JsonUtils.toJsonString(jsonResult), 0, 5000)); } } @@ -161,11 +161,11 @@ String requestMethod = operLog.getRequestMethod(); if (MapUtil.isEmpty(paramsMap) && StringUtils.equalsAny(requestMethod, HttpMethod.PUT.name(), HttpMethod.POST.name(), HttpMethod.DELETE.name())) { String params = argsArrayToString(joinPoint.getArgs(), excludeParamNames); - operLog.setOperParam(StringUtils.substring(params, 0, 2000)); + operLog.setOperParam(StringUtils.substring(params, 0, 5000)); } else { MapUtil.removeAny(paramsMap, EXCLUDE_PROPERTIES); MapUtil.removeAny(paramsMap, excludeParamNames); - operLog.setOperParam(StringUtils.substring(JsonUtils.toJsonString(paramsMap), 0, 2000)); + operLog.setOperParam(StringUtils.substring(JsonUtils.toJsonString(paramsMap), 0, 5000)); } } -- Gitblit v1.9.3