Commit 0b38ddd8 authored by yanzg's avatar yanzg

修复等待时间

parent aa671aaa
...@@ -51,11 +51,10 @@ public class AspectLogBody { ...@@ -51,11 +51,10 @@ public class AspectLogBody {
public String getBodyString(Object body) { public String getBodyString(Object body) {
String ret; String ret;
if (body instanceof String) { if (body instanceof String) {
ret = (String) body; ret = getMaxString((String) body);
} else { } else {
ret = JsonHelper.serialize(body); ret = getMaxString(JsonHelper.serialize(body));
} }
ret = getMaxString(ret);
return ret; return ret;
} }
......
...@@ -48,7 +48,7 @@ public class AspectLogResult { ...@@ -48,7 +48,7 @@ public class AspectLogResult {
* @param resultEx 异常结果 * @param resultEx 异常结果
* @param log 内容 * @param log 内容
*/ */
@Async // @Async
public void responseLog(Class<?> cls, String tag, String url, boolean logFlag, long start, public void responseLog(Class<?> cls, String tag, String url, boolean logFlag, long start,
Object requestBody, Object result, Exception resultEx, LogVo log) { Object requestBody, Object result, Exception resultEx, LogVo log) {
try { try {
......
...@@ -35,11 +35,10 @@ public class AspectLogStart { ...@@ -35,11 +35,10 @@ public class AspectLogStart {
* @param logFlag * @param logFlag
* @return * @return
*/ */
@Async // @Async
public void requestLog(Class<?> cls, String tag, String url, Object requestBody, LogVo log, boolean logFlag) { public void requestLog(Class<?> cls, String tag, String url, Object requestBody, LogVo log, boolean logFlag) {
try { try {
String body = aspectLogBody.getBodyString(requestBody); String body = aspectLogBody.getBodyString(requestBody);
body = aspectLogBody.getMaxString(body);
if (logFlag) { if (logFlag) {
this.logLocal.startLog(log, tag, String.format("%s:%s", this.cloudConfig.getApplicationName(), url), body); this.logLocal.startLog(log, tag, String.format("%s:%s", this.cloudConfig.getApplicationName(), url), body);
} }
......
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