sgroschupf/zkclient

SLF4J misuse

Closed this issue · 2 comments

It seems that the slf4j library is being misused. The purpose of this library is to allow all users of the your library to have their own logging back-end. However, in the current form you:

  1. Have org.slf4j:slf4j-log4j12:1.6.1 as a compile dependency
  2. Seem to be using log4j directly in the code instead of the facade classes provided by slf4j. This prevents one from simply excluding your org.slf4j:slf4j-log4j12:1.6.1 to avoid using it since then your code will throw a runtime ClassNotFound error.

The following explanation can be seen on slf4j's documentation:

Embedded components such as libraries or frameworks should not declare a dependency on any SLF4J binding but only depend on slf4j-api. When a library declares a compile-time dependency on a SLF4J binding, it imposes that binding on the end-user, thus negating SLF4J's purpose.
(http://www.slf4j.org/codes.html#multiple_bindings)

On further look. It seems you might have resolved this in this commit: 6ae1ca7

If this is the case feel free to close this.

Thanks for heads up!