Commit f26b0fce authored by 唐峰's avatar 唐峰

增加日志信息

parent d24ff396
...@@ -50,7 +50,7 @@ public class LogCallHttpAspect { ...@@ -50,7 +50,7 @@ public class LogCallHttpAspect {
try { try {
result = pjp.proceed(); result = pjp.proceed();
} catch (Exception e) { } catch (Exception e) {
log.error("[LogCallHttpAspect][record]出现异常",e); log.error("[LogCallHttpAspect][record]请求接口出现异常:{}",e.getMessage(),e);
hasException = true; hasException = true;
throw e; throw e;
} finally { } finally {
...@@ -61,10 +61,10 @@ public class LogCallHttpAspect { ...@@ -61,10 +61,10 @@ public class LogCallHttpAspect {
.collect(Collectors.toList()); .collect(Collectors.toList());
if (TechEnvironment.isPro() && request.getRequestURL().toString().contains("/oauth/login")) { if (TechEnvironment.isPro() && request.getRequestURL().toString().contains("/oauth/login")) {
log.info("[httpRequestLog],url:[{}],duration:[{}],[耗时区间]{},remoteIP:[{}],exception:[{}],result:[{}]", log.info("调用接口结束[httpRequestLog],url:[{}],duration:[{}],[耗时区间]{},remoteIP:[{}],exception:[{}],result:[{}]",
request.getRequestURL(), elapsed, slowlyTag(elapsed), remoteIP, hasException, resultStr); request.getRequestURL(), elapsed, slowlyTag(elapsed), remoteIP, hasException, resultStr);
} else { } else {
log.info("[httpRequestLog],url:[{}],duration:[{}],[耗时区间]{},remoteIP:[{}],args:[{}],exception:[{}],result:[{}]", log.info("调用接口结束[httpRequestLog],url:[{}],duration:[{}],[耗时区间]{},remoteIP:[{}],args:[{}],exception:[{}],result:[{}]",
request.getRequestURL(), elapsed, slowlyTag(elapsed), remoteIP, JSON.toJSONString(argList), hasException, resultStr); request.getRequestURL(), elapsed, slowlyTag(elapsed), remoteIP, JSON.toJSONString(argList), hasException, resultStr);
} }
......
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