Commit bed62e59 authored by yanzg's avatar yanzg

不记录系统日志

parent 68166749
......@@ -183,6 +183,10 @@ public class BaseRequestAspect {
return start;
}
protected void writeLogBody(LogVo log, String requestBody) {
}
/**
* 保存日志
*
......@@ -191,12 +195,16 @@ public class BaseRequestAspect {
* @param url
* @param logFlag
* @param start
* @param requestBody
* @param result
* @param resultEx
* @param log
*/
protected void responseLog(Class<?> cls, String tag, String url, boolean logFlag, long start, Object result, Exception resultEx, LogVo log) {
protected void responseLog(Class<?> cls, String tag, String url, boolean logFlag, long start,
String requestBody, Object result, Exception resultEx, LogVo log) {
try {
log.setContent(requestBody);
long time = System.currentTimeMillis() - start;
boolean isLogDisplay = (logFlag && logCommon) || resultEx != null;
boolean isLogDatabase = log != null || resultEx != null;
......
......@@ -67,7 +67,7 @@ public class FeignAspect extends BaseRequestAspect {
ex = e;
throw e;
} finally {
responseLog(declaringType, TAG, url, clear, start, result, ex, log);
responseLog(declaringType, TAG, url, clear, start, getRequestBody(joinPoint), result, ex, log);
}
}
......
......@@ -62,7 +62,7 @@ public class MqAspect extends BaseRequestAspect {
ex = e;
throw e;
} finally {
responseLog(declaringType, TAG, url, clear, start, result, ex, log);
responseLog(declaringType, TAG, url, clear, start, getRequestBody(joinPoint), result, ex, log);
}
}
......
......@@ -120,7 +120,7 @@ public class WebAspect extends BaseRequestAspect {
if (isInit) {
TokenHelper.remove();
}
responseLog(declaringType, TAG, url, clear, start, result, ex, log);
responseLog(declaringType, TAG, url, clear, start, getRequestBody(joinPoint), result, ex, log);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment