Closed socksy closed 2 months ago
OK, I figured it out.
I was getting SLF4J via Kaocha, see the deps tree:
lambdaisland/kaocha 1.91.1392
. com.nextjournal/beholder 1.0.2
. io.methvin/directory-watcher 0.17.3
. net.java.dev.jna/jna 5.12.1
. org.slf4j/slf4j-api 1.7.36
as documented in the wiki here, SLF4J-api needs to be 2.0.0 or higher, and it's lower than that. So I had added an explicit include in my :dev
alias like so:
:dev {:extra-deps {org.slf4j/slf4j-api {:mvn/version "2.0.13"}
lambdaisland/kaocha {:mvn/version "1.91.1392"}
lambdaisland/kaocha-cucumber {:mvn/version "0.11.100"}}}
:test {:extra-paths ["test"]
:extra-deps {lambdaisland/kaocha {:mvn/version "1.91.1392"}
lambdaisland/kaocha-cucumber {:mvn/version "0.11.100"}}
:main-opts ["-m" "kaocha.runner"]}}}
But of course, when using the kaocha runner, it doesn't look into that alias at all, and that's where I was seeing the error. Since I have telemere up in the top level :deps
key, I moved the org.slf4j/slf4j-api
key up to there, and now the warning has disappeared.
So PEBKAC, as usual
Hey Ben, good to hear from you!
No problem at all, happy you found a solution.
Thanks for the clear issue description, and for updating on the conclusion - this experience may also be handy for others 🙏
Feel free to ping if you run into anything else.
Sorry if this question belies my complete lack of a mental model of what is going on — it's because I have a complete lack of a mental model of what is going on.
When using some Java libraries in Clojure, you occasionally get the startup warning:
The standard advice for this with most people I know has been — add slf4j-timbre to your
deps.edn
, and this warning will magically go away. Since almost all serious projects were using timbre anyway, this seemed like a no-brainer. Somehow somewhere including this library presumably meant that we were creating a binder for SLF4J such that it all goes through to timbre, and then we only need to worry about where that goes.Now telemere is the better library (OpenTelemetry!) , and I'm starting a new project using it, and I'm getting the dreaded StaticLoggerBinder warning. I saw that you have an SLF4J backend for telemere, which I've included in my requires, but I'm still seeing this logger. I guess I'm doing something wrong.