Commit 852e2c82 authored by 赵啸非's avatar 赵啸非

rabbitmq添加

parent c73408ea
......@@ -76,7 +76,7 @@ public class WebLogAspect {
}
/**
* 打印请求日志
* 打印请求日志,包含异常
*/
@AfterReturning(pointcut = "webLog()|| exceptions()", returning = "result")
public void afterReturning(Object result) {
......@@ -109,6 +109,8 @@ public class WebLogAspect {
pspanId="0";
}
String ua = request.getHeader("User-Agent");
AccessLogPdu accessLogPdu = new AccessLogPdu();
accessLogPdu.initAttrValue();
accessLogPdu.setAppName(appName);
......@@ -120,8 +122,8 @@ public class WebLogAspect {
accessLogPdu.setUri(request.getRequestURI());
accessLogPdu.setTargetServer(appName);
accessLogPdu.setRequestIp(request.getRemoteAddr());
accessLogPdu.setUa(request.getHeader("User-Agent"));
accessLogPdu.setRequestTime(new Date(Long.parseLong(startTime)));
accessLogPdu.setUa(ua==null?"":ua);
//accessLogPdu.setRequestTime(new Date(Long.parseLong(startTime)));
accessLogPdu.setLogTime(new Date());
accessLogPdu.setMethod(request.getMethod());
accessLogPdu.setResponseTime(new Date());
......
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