Closed robobario closed 4 months ago
Tested locally, with patch the transitive dependencies aren't being picked up: Before
$ ./kafka-cruise-control-start.sh ./cruisecontrol.properties
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/mhratson/src/cruise-control.3/cruise-control/build/dependant-libs/log4j-slf4j-impl-2.17.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/mhratson/src/cruise-control.3/cruise-control/build/dependant-libs/logback-classic-1.2.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
After (no multiple bindings logs)
$ ./kafka-cruise-control-start.sh ./cruisecontrol.properties
[2024-07-24 16:27:26,064] INFO COMMIT INFO: 2.5.139-SNAPSHOT---f23332a2ec4f8f3f0d69cd6e6f3b7aa9e33fb873 (com.linkedin.kafka.cruisecontrol.KafkaCruiseControl)
[2024-07-24 16:27:26,069] INFO AdminClientConfig values:
auto.include.jmx.reporter = true
Exclude logback from being depended on transitively (following established pattern for excluding log4j:log4j)
Why: A logback slf4j binding is being pulled in via zookeeper causing issues at runtime because we have two slf4j bindings available. Slf4j chooses one implementation and it can pick logback, which is unexpected.
To reproduce on
main
:This PR resolves #2174