I've tried everything that I can think of to disable the DEBUG [org.apache.http.wire ...
verbose HTTP client log output to the console, but I just can't get it to stop. Has anybody else managed to do this?
This issue is seen when running lein test
I've tried (System/setProperty "org.apache.commons.logging.Log" "org.apache.commons.logging.impl.NoOpLog")
I've also tried setting a log4j.properties
file and also (-> (Logger/getLogger "org.apache.http.impl.client") (.setLevel Level/OFF))
... amongst many many other things. I've tried all sorts of log name strings and nothing seems to affect the debug output.
Is this coming from etaoin? (just checking)
isn’t apache http client using log4j2? then try log4j2.properties
It's coming from an Etaoin dependency, yes. Well, at least I think it is; perhaps I'm wrong. I didn't know that one could make a log4j2.properties
file. Thanks. Will try that right now
Hrm. No luck with that. I think that I'll check out the Etaoin code locally and investigate that. Perhaps it isn't Etaoin, but at least I can rule it out.
Certainly, Etaoin has a log4j file, but I can't seem to override it: https://github.com/igrishaev/etaoin/blob/master/resources/log4j.properties
Haven’t seen these logs before, FWIW
@scottlowe: one problem is Etaoin includes log4j as a dependency and it shouldn’t.
Ideally Etaoin, would remove this line https://github.com/igrishaev/etaoin/blob/master/project.clj#L9 from project.clj
and leave it to the application to choose an SLF4J backend (clojure.tools.logging uses SLF4j to abstract across loggers).
If the Etaoin developers want to use log4j to develop etaoin then they could set log4j as a :provided
scope/dependency.
But you can probably work around by adding an :exclusions [log4j/log4j]
bit to your etaoin coordinate.
@rickmoynihan Thanks! I was close... I excluded everything else that I could think of, except that, because I thought it was required. BRB
Damn. No luck there, either. Giving up for now. Will return to this tomorrow.