ygsama opened a new issue #2734: TraceId is N/A in Logback AsyncAppender with TraceIdMDCPatternLogbackLayout URL: https://github.com/apache/skywalking/issues/2734 Please answer these questions before submitting your issue. - Why do you submit this issue? - [x] Question or discussion - [x] Bug - [ ] Requirement - [ ] Feature or performance improvement ___ ### Question - What do you want to know? When I try to print TraceId in log with `apm-toolkit-logback-1.x` by #1241 #567 demo, I find it worked will with `ConsoleAppender`, but always print `N/A` with `AsyncAppender` . ``` <!-- logbak.xml --> <configuration scan="true" scanPeriod=" 5 seconds"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder"> <layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.mdc.TraceIdMDCPatternLogbackLayout"> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%X{tid}] [%thread] %-5level %logger{56} --- %msg%n</pattern> </layout> </encoder> </appender> <appender name="ASYNC_PRINT" class="ch.qos.logback.classic.AsyncAppender"> <discardingThreshold>0</discardingThreshold> <queueSize>1024</queueSize> <neverBlock>true</neverBlock> <appender-ref ref="STDOUT"/> </appender> <root level="DEBUG"> <appender-ref ref="ASYNC_PRINT"/> </root> </configuration> ``` ___ ### Bug - Which version of SkyWalking, OS and JRE? SkyWalking version "6.1" java version "1.8.0_161" OS version "Widows 10" - Which company or project? Spring Boot 2.1.X project - What happen? `N/A` instead of TraceID in log. And I don't know if need other setting or coding or it's a bug.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
