Commit c51b5a4f authored by 王亮's avatar 王亮

fix an issue(log)

parent 43111c26
......@@ -63,17 +63,19 @@ public class LogCallHttpAspect {
if (TechEnvironment.isPro() && request.getRequestURL().toString().contains("/oauth/login")) {
log.info("[httpRequestLog],url:[{}],duration:[{}],[耗时区间]{},remoteIP:[{}],exception:[{}],result:[{}]",
request.getRequestURL(), elapsed, slowlyTag(elapsed), remoteIP, hasException, resultStr);
} else {
log.info("[httpRequestLog],url:[{}],duration:[{}],[耗时区间]{},remoteIP:[{}],args:[{}],exception:[{}],result:[{}]",
request.getRequestURL(), elapsed, slowlyTag(elapsed), remoteIP, JSON.toJSONString(argList), hasException, resultStr);
}
log.info("[httpRequestLog],url:[{}],duration:[{}],[耗时区间]{},remoteIP:[{}],args:[{}],exception:[{}],result:[{}]",
request.getRequestURL(), elapsed, slowlyTag(elapsed), remoteIP, JSON.toJSONString(argList), hasException, resultStr);
}
return result;
}
private String slowlyTag(long elapsed) {
Long second = elapsed / 1000L;
long second = elapsed / 1000L;
String outTimeFormat = "[outTime_%s]";
StringBuffer sb = new StringBuffer();
StringBuilder sb = new StringBuilder();
// 3秒步长
for (int outTime = 3; outTime <= second; outTime++) {
sb.append(String.format(outTimeFormat, outTime));
......
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