Skip to content
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

Remove slfj-simple dependency, or make it provided? #67

Open
daviddenton opened this issue Sep 29, 2016 · 1 comment
Open

Remove slfj-simple dependency, or make it provided? #67

daviddenton opened this issue Sep 29, 2016 · 1 comment

Comments

@daviddenton
Copy link

The inclusion of "org.slf4j" % "slf4j-simple" % "1.6.4" as a dependency causes problems with multiple StaticLoggerBinder implementation warnings:

SLF4J: Class path contains multiple SLF4J bindings.

Due to the inability to specify which SL4J implementation to use, this means that the first loaded JAR implementation of StaticLoggerBinder wins. In environments where you can't easily control the classpath order (e.g. the universal packaging format output by SBT), this is a problem.

Including the sl4j-api dependency alone will be enough and allow people using this lib to choose their own logging framework! :)

@chbrown
Copy link

chbrown commented Sep 29, 2016

Agreed. I'm new-ish to Java/Scala logging, but I get the impression that it's bad form to specify a concrete logging implementation in a library meant for public use — kind of like logging to stdout: it prevents downstream users from being able to sanely handle logs emanating from your library.

For anyone else arriving here from Google, replace (in your build.sbt's libraryDependencies):

"com.gilt" %% "handlebars-scala" % "2.1.1"

With:

"com.gilt" %% "handlebars-scala" % "2.1.1" exclude("org.slf4j", "slf4j-simple")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants