opt:日志优化2
This commit is contained in:
@@ -25,7 +25,6 @@ public class AsyncLuceneAppender extends AspectLogbackAsyncAppender {
|
||||
if (mdcPropertyMap.getClass().getName().contains("SynchronizedMap")) {
|
||||
mdcPropertyMap.put("traceId", traceId);
|
||||
}
|
||||
MDC.clear();
|
||||
}
|
||||
super.append(event);
|
||||
}
|
||||
|
||||
@@ -139,8 +139,8 @@ public class LogAspect {
|
||||
throw ex;
|
||||
} finally {
|
||||
log.info("[--response--][请求接口:{} 执行结束][耗时:{}s]", url, (System.currentTimeMillis() - comming) / 1000);
|
||||
MDC.clear();
|
||||
LuceneAppender.traceIdTL.remove();
|
||||
MDC.clear();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user