I'm working with a 3rd party library implemented in Clojure which logs messages using clojure.tools.logging.
I want to suppress these messages in Eclipse and have tried the following suggestion to no avail.
Any (hacky) solutions greatly appreciated.
It sounds like your clojure.tools.logging is using a different underlying logging implementation than the rest of your application?
For example if your application is using java.util.logging, but you have a stray log4j library in your classpath, then clojure.tools.logging would detect log4j and would therefore not react to the logging config changes you were making.
The logic for detecting the underlying logging implementation is here:
https://github.com/clojure/tools.logging/blob/master/src/main/clojure/clojure/tools/logging/impl.clj
Specifically:
(defn find-factory
"Returns the first non-nil value from slf4j-factory, cl-factory,
log4j-factory, and jul-factory."
[]
(or (slf4j-factory)
(cl-factory)
(log4j-factory)
(jul-factory)
(throw ; this should never happen in 1.5+
(RuntimeException.
"Valid logging implementation could not be found."))))
It would be helpful to run mvn dependency:tree or lein deps :tree to see what logging dependencies are on your classpath.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With