Commit 6795c864 authored by 于桐's avatar 于桐

日志长度还原

parent 07dfb713
...@@ -58,7 +58,7 @@ public class LogCallHttpAspect { ...@@ -58,7 +58,7 @@ public class LogCallHttpAspect {
Stopwatch stop = stopwatch.stop(); Stopwatch stop = stopwatch.stop();
long elapsed = stop.elapsed(TimeUnit.MILLISECONDS); long elapsed = stop.elapsed(TimeUnit.MILLISECONDS);
String resultStr = result == null ? "" : objectMapper.writeValueAsString(result); String resultStr = result == null ? "" : objectMapper.writeValueAsString(result);
resultStr = resultStr.length() < 1000 ? resultStr : resultStr.substring(0, 1000); resultStr = resultStr.length() < 500 ? resultStr : resultStr.substring(0, 500);
log.info("[httpRequestLog],url:[{}],remoteIP:[{}],args:[{}],duration:[{}],exception:[{}],result:[{}]", log.info("[httpRequestLog],url:[{}],remoteIP:[{}],args:[{}],duration:[{}],exception:[{}],result:[{}]",
request.getRequestURL(), remoteIP, args, elapsed, hasException, resultStr); request.getRequestURL(), remoteIP, args, elapsed, 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