Scribe SLF4J2 and doobie-hikari issues #405
-
Hello, I'm creating a standard stack backend app using htt4s, quill-doobie and of course scribe :) App was working fine (in a sense that logging was working), but since I've introduced quill-doobie and doobie-hikari lib, I started getting this on the app startup SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details.
SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions prior to 1.8.
SLF4J: Ignoring binding found at [jar:file:/Users/mirko/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/com/outr/scribe-slf4j_2.13/3.11.0/scribe-slf4j_2.13-3.11.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#ignoredBindings for an explanation. So I went to the link https://www.slf4j.org/codes.html#ignoredBindings, and see that some versions are off. Slf4j version 1.8 and higher use ServiceLoader mechanism instead of StaticBinding. I saw in the code that there is some work on slf4j2 version https://github.com/outr/scribe/blob/master/build.sbt#L57, and I also took a look at the the doobie lib. The doobie folks seems to have the same issue. https://github.com/tpolecat/doobie/blob/main/build.sbt#L10 https://github.com/tpolecat/doobie/blob/main/build.sbt#L329-L330 I've tried to exclude myself, but it's still not working. I was wondering is the slf4j2 version ready? Or something else I'm missing? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
The reason that both Scribe and Doobie don't rely on 1.8 is that it's still in beta. The |
Beta Was this translation helpful? Give feedback.
-
Hmm yeah I tried the dependency order swap, didn't work. Anyways it appears I just suck at SBT 😄 Instead of excluding it I should have been "forcing it". When I added this line to project settings
it started working again. Something about |
Beta Was this translation helpful? Give feedback.
-
No worries, glad you got it figured out! |
Beta Was this translation helpful? Give feedback.
Hmm yeah I tried the dependency order swap, didn't work. Anyways it appears I just suck at SBT 😄
Instead of excluding it I should have been "forcing it". When I added this line to project settings
dependencyOverrides += "org.slf4j" % "slf4j-api" % "1.7.36",
it started working again. Something about
quill-doobie
anddoobie-hikari
libs was off. But anyway sorry for the trouble, thank you for the answer and for the time and for the awesome lib 😃