Prevent clojure writing in Eclipse?

I am working with a third party library implemented in Clojure that logs messages using clojure.tools.logging.

I want to suppress these messages in Eclipse and have tried the following to no avail.

Any (hacker) solutions were highly appreciated.

+3


source to share


1 answer


Does it look like your clojure.tools.logging is using a different main boolean implementation than the rest of your application?

For example, if your application uses java.util.logging, but you have an empty log4j library in your classpath, then clojure.tools.logging will detect log4j and therefore will not respond to the logging configuration changes you were making.

The detection logic of the basic logging implementation is here:

https://github.com/clojure/tools.logging/blob/master/src/main/clojure/clojure/tools/logging/impl.clj



In particular:

(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 dependencies in the log are related to your classpath.

+1


source







All Articles