question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

rocketmq-tools should not depend on logback-classic

See original GitHub issue

rocketmq-tools depends on logback-classic, which includes a StaticLoggerBinder class which binds slf4j to logback.

This binding shouldn’t be made by a library since only one binding can exist in the entire application, so any application that uses multiple libraries may have inconsistent bindings. The binding should be chosen only by the final application (i.e., the person implementing main()).

This, for example, causes warnings in openmessaging/benchmark which have chosen log4j binding, but the logback binding included from rocketmq causes a conflict.

It rocketmq-tools depended on logback-core instead, it would not include the slf4j binding which is one way to solve this problem.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
aaron-aicommented, Oct 21, 2022

@travisdowns I think you are right. As a library, rocketmq-tools should not introduce the facade and the implementation at the same time.

I will start a RIP about replacing current logging module by a shaded logback recently, which may also solve this problem, you could view the related code from https://github.com/aliyun-mq/rocketmq-logging.

0reactions
travisdownscommented, Oct 31, 2022

@aaron-ai any idea?

Read more comments on GitHub >

github_iconTop Results From Across the Web

[jira] [Commented] (ROCKETMQ-158) Remove logback dependency ...
They will need to use rocketmq-tools which contains DefaultMQAdminExt. > But rocketmq-tools has explicitly depend on logback-classic and logback-core, which may ...
Read more >
Apache RocketMQ is a cloud native messaging and ... - GitHub
Apache RocketMQ is a cloud native messaging and streaming platform, making it simple to build event-driven applications. - GitHub - apache/rocketmq: Apache ...
Read more >
Message Queue for Apache RocketMQ
Initialization does not often occur in the production environment. ... Method 2: Depend on the logback logging framework. <dependency>.
Read more >
Rocketmq日志收集与logback集成Demo - 老梁讲Java - 博客园
Rocketmq 日志收集与logback集成Demo. 官方文档有简洁的例子,这里就做一个简单补充和实践. 直接上logback-boot.xml文件.
Read more >
rocketmq-console查询发送消息明细异常实战及重新打包
背景:​. server/console版本:MQ版本4.0,Console版本1.0。 异常: 在通过console控制台查询topic内message消费的消息详情时,手动发送消息后再去查看 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found