apache / apache/rocketmq

rocketmq-tools should not depend on logback-classic

Open
#5,347 14 comments 1 reaction 0 assignees View on GitHub
module/tools progress/discuss
Dominant language
Java
Stars
22.6k
Forks
12k
Avg merge
2d 20h
Merged PRs (30d)
26

Description

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.

Contributor guide

Open the contributing guide

Research direction

Start by locating the dependency declaration for rocketmq-tools and inspect its resolved logging dependencies. Verify that replacing logback-classic with logback-core removes the StaticLoggerBinder conflict while retaining the required logging support. Confirm the result with the project's dependency checks or an application using the log4j binding.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.