优化日志
This commit is contained in:
parent
c6eb18e839
commit
1bd78fc291
@ -71,7 +71,7 @@ public class LogMdcConfiguration {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSubscribe(Subscription subscription) {
|
public void onSubscribe(Subscription subscription) {
|
||||||
|
//Tracer.createEntrySpan(Log4Constans.PRINT_LOG_ID, null);
|
||||||
coreSubscriber.onSubscribe(subscription);
|
coreSubscriber.onSubscribe(subscription);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -92,12 +92,10 @@ public class LogWebFilter implements WebFilter {
|
|||||||
log.info("api end time:{}, total time:{}", endTime, endTime - startTime);
|
log.info("api end time:{}, total time:{}", endTime, endTime - startTime);
|
||||||
//Tracer.stopSpan();
|
//Tracer.stopSpan();
|
||||||
MDC.remove(Log4Constans.PRINT_LOG_ID);
|
MDC.remove(Log4Constans.PRINT_LOG_ID);
|
||||||
|
}).contextWrite(ctx -> {
|
||||||
|
Context contextTmp = ctx.put(Log4Constans.PRINT_LOG_ID, tracId);
|
||||||
|
return contextTmp;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ServerHttpRequest getRequest(ServerWebExchange exchange){
|
private ServerHttpRequest getRequest(ServerWebExchange exchange){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user