-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A problem with an abnormal log output location. #2582
Comments
I don't actually see a problem being stated anywhere here. What exactly is wrong? |
Hello, the program uses both rocketmq and redis and uses the topology refresh feature of redis, which has a dependency on lettuce-core, and the program is using log4j as the log collection output. We set ERROR in the log output of rocketmq component and output the logs to rocketmq-client.log, because we set the rocketmq log output level to ERROR, normally rocketmq-client.log will only print ERROR about rocketmq's logs, but the real Normally, rocketmq-client.log would only print ERROR logs for rocketmq, but in reality, it outputs DEBUG logs for lettuce-core, which is a dependency of spring-boot-stater-data-redis. It should not be in this log file. It's not clear why it arises, is it something to do with the order in which the component's logging dependencies are loaded? |
Can you check if your application is using Log4j for all logging: many RocketMQ artifacts have a dependency on If your runtime dependencies are configured correctly (no Logback, an appropriate |
Okay, thanks. I'll double-check. |
Hi, this is not a problem, I am using rocketmq-client, not rocketmq-tools, rocketmq-client is using log4j-api 2.7 for log management. |
@FrankCy, could you share with us a minimal1 1 Minimal as in including a dependency if and only it is related with the problem; no other dependencies, plugins, properties, etc. that are irrelevant with the problem. |
|
This problem may be due to the rocketmq component implementation of the default binding logback, lettuce-core output logs using netty-common, also bound to the logback, so the application of the log4j2.xml can not control them, so far it seems that may be the reason, I'll watch again! |
@FrankCy, thanks for the update. I am closing the issue. Feel free to re-open it when you manage to create the minimal reproduction code that I asked for. |
Description
The rocketmq-client.log outputs lettuce logs and the rocketmq log level is ERROR and the output lettuce log is DEBUG.
Configuration
Version:
Log4j:2.18.0
lettuce-core:5.1.7.RELEASE
spring-boot-starter-data-redis:2.4.1
spring-data-redis:2.1.9.RELEASE
rocketmq:4.6.0
Operating system: [OS and version]
JDK: [JDK distribution and version]
Darwin frank 21.3.0 Darwin Kernel Version 21.3.0: Wed Jan 5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T8101 arm64
Logs
The text was updated successfully, but these errors were encountered: