fix: 减少正常日志包含error信息

dev
huangfeng 1 year ago
parent 88cdbf7301
commit 2b4fae206c

@ -1,5 +1,6 @@
package com.shxy.xymanager_common.bean; package com.shxy.xymanager_common.bean;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@ -9,6 +10,7 @@ import java.io.Serializable;
* *
* @author * @author
*/ */
@JsonInclude(JsonInclude.Include.NON_NULL)
@Data @Data
public class SysOperLog implements Serializable { public class SysOperLog implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

@ -1,6 +1,7 @@
package com.shxy.xymanager_framework.aspect; package com.shxy.xymanager_framework.aspect;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.shxy.xymanager_common.util.JSONUtil;
import com.shxy.xymanager_common.util.ServletUtils; import com.shxy.xymanager_common.util.ServletUtils;
import com.shxy.xymanager_common.annotation.Log; import com.shxy.xymanager_common.annotation.Log;
import com.shxy.xymanager_common.bean.SysOperLog; import com.shxy.xymanager_common.bean.SysOperLog;
@ -93,7 +94,7 @@ public class LogAspect {
sysOperLog.setMethod(className + "." + methodName + "()"); sysOperLog.setMethod(className + "." + methodName + "()");
// 处理设置注解上的参数 // 处理设置注解上的参数
getControllerMethodDescription(joinPoint, controllerLog, sysOperLog, jsonResult); getControllerMethodDescription(joinPoint, controllerLog, sysOperLog, jsonResult);
log.info(sysOperLog.toString()); log.info(JSONUtil.object2Json(sysOperLog));
} catch (Exception exp) { } catch (Exception exp) {
// 记录本地异常日志 // 记录本地异常日志
log.error("==前置通知异常=="); log.error("==前置通知异常==");

Loading…
Cancel
Save