|
|
|
@ -45,6 +45,8 @@ public class DevLogUtil {
|
|
|
|
|
*/ |
|
|
|
|
public static void executeOperationLog(CommonLog commonLog, String userName, JoinPoint joinPoint, String resultJson) { |
|
|
|
|
HttpServletRequest request = CommonServletUtil.getRequest(); |
|
|
|
|
String requestURI = request.getRequestURI(); |
|
|
|
|
String method = request.getRequestURI(); |
|
|
|
|
DevLog devLog = genBasOpLog(); |
|
|
|
|
ThreadUtil.execute(() -> { |
|
|
|
|
devLog.setCategory(DevLogCategoryEnum.OPERATE.getValue()); |
|
|
|
@ -52,8 +54,8 @@ public class DevLogUtil {
|
|
|
|
|
devLog.setExeStatus(DevLogExeStatusEnum.SUCCESS.getValue()); |
|
|
|
|
devLog.setClassName(joinPoint.getTarget().getClass().getName()); |
|
|
|
|
devLog.setMethodName(joinPoint.getSignature().getName()); |
|
|
|
|
devLog.setReqMethod(request.getMethod()); |
|
|
|
|
devLog.setReqUrl(request.getRequestURI()); |
|
|
|
|
devLog.setReqMethod(method); |
|
|
|
|
devLog.setReqUrl(requestURI); |
|
|
|
|
devLog.setParamJson(CommonJoinPointUtil.getArgsJsonString(joinPoint)); |
|
|
|
|
devLog.setResultJson(resultJson); |
|
|
|
|
devLog.setOpTime(DateTime.now()); |
|
|
|
@ -71,6 +73,8 @@ public class DevLogUtil {
|
|
|
|
|
*/ |
|
|
|
|
public static void executeExceptionLog(CommonLog commonLog, String userName, JoinPoint joinPoint, Exception exception) { |
|
|
|
|
HttpServletRequest request = CommonServletUtil.getRequest(); |
|
|
|
|
String requestURI = request.getRequestURI(); |
|
|
|
|
String method = request.getRequestURI(); |
|
|
|
|
DevLog devLog = genBasOpLog(); |
|
|
|
|
ThreadUtil.execute(() -> { |
|
|
|
|
devLog.setCategory(DevLogCategoryEnum.EXCEPTION.getValue()); |
|
|
|
@ -79,8 +83,8 @@ public class DevLogUtil {
|
|
|
|
|
devLog.setExeMessage(ExceptionUtil.stacktraceToString(exception, Integer.MAX_VALUE)); |
|
|
|
|
devLog.setClassName(joinPoint.getTarget().getClass().getName()); |
|
|
|
|
devLog.setMethodName(joinPoint.getSignature().getName()); |
|
|
|
|
devLog.setReqMethod(request.getMethod()); |
|
|
|
|
devLog.setReqUrl(request.getRequestURI()); |
|
|
|
|
devLog.setReqMethod(method); |
|
|
|
|
devLog.setReqUrl(requestURI); |
|
|
|
|
devLog.setParamJson(CommonJoinPointUtil.getArgsJsonString(joinPoint)); |
|
|
|
|
devLog.setOpTime(DateTime.now()); |
|
|
|
|
devLog.setOpUser(userName); |
|
|
|
|