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 2022/01/13 14:24:45 UTC
[GitHub] [skywalking] stardyun opened a new issue #8426: [Bug] Why logs (use logback toolkit) TraceId lost in ActiveMQConsumer Method
stardyun opened a new issue #8426:
URL: https://github.com/apache/skywalking/issues/8426
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no similar issues.
### Apache SkyWalking Component
Java Agent (apache/skywalking-java)
### What happened
1. config logback.xml
```
add org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout
add %tid in pattern
```
2. log in ActiveMQConsumer Method
```
@JmsListener(destination = "LOAN_CONTRACT_AUTO_SIGN")
public void receive(String data) {
log.info("loan_contract_auto_sign, data:{}", data);
}
```
`[ifs] 2022-01-13 15:35:11,536 INFO [DefaultMessageListenerContainer-1] [TID:N/A] [user: unknown] loan_contract_auto_sign, data: ...`
3. **tid is N/A**
### What you expected to happen
example:
```
@JmsListener(destination = "LOAN_CONTRACT_AUTO_SIGN")
public void receive(String data) {
log.info("loan_contract_auto_sign, data:{}", data);
}
```
`[ifs] 2022-01-13 15:35:11,536 INFO [DefaultMessageListenerContainer-1] [TID:N/A] [user: unknown] loan_contract_auto_sign, data: ...`
**_N/A There are normal_**
### How to reproduce
example:
```
@JmsListener(destination = "LOAN_CONTRACT_AUTO_SIGN")
public void receive(String data) {
log.info("loan_contract_auto_sign, data:{}", data);
}
```
`[ifs] 2022-01-13 15:35:11,536 INFO [DefaultMessageListenerContainer-1] [TID:N/A] [user: unknown] loan_contract_auto_sign, data: ...`
### Anything else
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org