Commit 55785ef7 authored by yanzg's avatar yanzg

修复等待时间

parent ed4e5136
...@@ -56,10 +56,10 @@ public class AspectLogResult { ...@@ -56,10 +56,10 @@ public class AspectLogResult {
String fullUrl = String.format("%s:%s", tag, url); String fullUrl = String.format("%s:%s", tag, url);
// 输出日志标记 // 输出日志标记
boolean isLogCommon = logFlag && this.cloudConfig.isLogCommon(); boolean isLogCommon = logFlag && this.cloudConfig.isLogCommon();
boolean isLogDatabase = resultEx != null; boolean isError = resultEx != null;
boolean isLogDisplay = isLogCommon || isLogDatabase; boolean isLogDisplay = isLogCommon || isError;
// 记录请求时间 // 记录请求时间
aspectLogTime.finish(fullUrl, time, isLogDatabase); aspectLogTime.finish(fullUrl, time, isError);
// ThreadHelper.waitRun(WAIT_MAX, WAIT_ITEM, k -> StringHelper.isEmpty(log.getLogId())) // ThreadHelper.waitRun(WAIT_MAX, WAIT_ITEM, k -> StringHelper.isEmpty(log.getLogId()))
if (StringHelper.isEmpty(log.getLogId()) || !isLogDisplay) { if (StringHelper.isEmpty(log.getLogId()) || !isLogDisplay) {
return; return;
...@@ -82,7 +82,7 @@ public class AspectLogResult { ...@@ -82,7 +82,7 @@ public class AspectLogResult {
String json = JsonHelper.serialize(responseResult); String json = JsonHelper.serialize(responseResult);
Log.error(cls, resultEx, "%s [ %s ] time %d ms, result: %s", tag, url, time, aspectLogBody.getMaxString(json)); Log.error(cls, resultEx, "%s [ %s ] time %d ms, result: %s", tag, url, time, aspectLogBody.getMaxString(json));
if (isLogDatabase) { if (isError) {
logLocal.result(log, responseResult.getCode(), json); logLocal.result(log, responseResult.getCode(), json);
} }
} catch (Exception e) { } catch (Exception e) {
......
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