You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2018/05/18 06:37:01 UTC
[GitHub] candyleer opened a new issue #1241: TraceId is invalid in Logback
AsyncAppender
candyleer opened a new issue #1241: TraceId is invalid in Logback AsyncAppender
URL: https://github.com/apache/incubator-skywalking/issues/1241
Please answer these questions before submitting your issue.
- Why do you submit this issue?
- [ ] Question or discussion
- [x] Bug
- [ ] Requirement
- [ ] Feature or performance improvement
___
### Question
- What do you want to know?
___
### Bug
- Which version of SkyWalking, OS and JRE?
beta
- Which company or project?
- What happen?
If possible, provide a way for reproducing the error. e.g. demo application, component version.
if we use async appender in logback,the traceId will be not printed,config
```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.TraceIdPatternLogbackLayout">
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level [%tid] %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="INFO">
<appender-ref ref="ASYNC_PRINT"/>
</root>
</configuration>
```
some log example,the log are in trace context
```
2018-05-18 14:35:19.501 [http-nio-8081-exec-1] INFO [TID:N/A] 47 com.example.test.TestApplication --- set jedis success:nn
2018-05-18 14:35:19.501 [http-nio-8081-exec-1] INFO [TID:N/A] 47 com.example.test.TestApplication --- set jedis success:null
```
I am working to resolve this problem cause async appender is widely used for log performance.
___
### Requirement or improvement
- Please describe about your requirements or improvement suggestions.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services