clojisr icon indicating copy to clipboard operation
clojisr copied to clipboard

org.clojure/tools.logging dependency

Open awb99 opened this issue 5 years ago • 4 comments

I just added clojisr beta 11 to a new project.clj On compiling I got the error that a namespace from org.clojure/tools.logging is missing. I fixed it by adding [org.clojure/tools.logging "1.0.0"] to my project.clj

I then did lein deps :tree and found this dependency of clojisr: [commons-logging "1.2"]

Unfortunately since you dont have ci tool, I cannot really look into the source related to this version. And I am too lazy to extract the source code from the jar that is in: ~/.m2/repository/scicloj/clojisr/1.0.0-BETA11

Could it be that you changed logging system and forgot to update a dependency?

awb99 avatar Jun 01 '20 18:06 awb99

I don't know why commons-logging is there. The only dependency should be org.clojure/tools.logging which requires your own configuration of logging system. I'll check it soon.

genmeblog avatar Jun 01 '20 18:06 genmeblog

Perhaps this line in project.clj brings the org.clojure/tools.logging dependency :jvm-opts ["-Dclojure.tools.logging.factory=clojure.tools.logging.impl/jul-factory"]

My proect does not have this config, si this might be, why I had to add it manually.

awb99 avatar Jun 01 '20 21:06 awb99

The java logging system is awful. As the library author I shouldn't force logging backend. User should choose it and configure it properly. tools-logging just creates api and looks for logging libraries on the classpath. There are 5 options: logback, jul, log4j, slf4d and commons logging. If any of the dependencies bring their own backend - such will be used. This is unfortunate but this is how it works.

genmeblog avatar Jun 01 '20 21:06 genmeblog

I looked at this, and do not see a issue with BETA19. The depeddency to commons loging is not there any more.

I then did lein deps :tree and found this dependency of clojisr: [commons-logging "1.2"]

I propose to close it

behrica avatar Nov 08 '21 21:11 behrica