mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-23 23:09:47 +08:00
update 优化 将Log记录参数长度扩充为5000更符合实际需求
This commit is contained in:
@ -100,7 +100,7 @@ public class LogAspect {
|
||||
|
||||
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 @@ public class LogAspect {
|
||||
}
|
||||
// 是否需要保存response,参数和值
|
||||
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 @@ public class LogAspect {
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user