fzakaria / slf4j-timbre

SLF4J binding for Clojure's Timbre
Eclipse Public License 1.0
94 stars 23 forks source link

Choice of two errors, no errors is not an option #34

Closed krestivo-kdinfotech closed 5 years ago

krestivo-kdinfotech commented 5 years ago

With this:

;; ...
                  [com.fzakaria/slf4j-timbre "0.3.13"]
                   [com.taoensso/timbre "4.10.0"]
                     [org.slf4j/slf4j-log4j12 "1.7.26"]

I get

log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

OK... if I add this, though:

;; ...
                [com.fzakaria/slf4j-timbre "0.3.13"]
                   [com.taoensso/timbre "4.10.0"]
                     [org.slf4j/slf4j-log4j12 "1.7.26"]
                 [org.slf4j/log4j-over-slf4j "1.7.14"]

Then the whole compile fails, with:

                             PatternLayout.TTCC_CONVERSION_PATTERN);
                                          ^
  symbol:   variable TTCC_CONVERSION_PATTERN
  location: class PatternLayout

From a .java source file vendored dependency that does its own log4j logging.

In both cases, lein tree shows that this does include

 [log4j "1.2.17"]

as a transitive dependency.

I could edit the java dep but will probably just limp along with the apache error instead.

rufoa commented 5 years ago

Thanks for the report. I'm still trying to figure out what's going on here, but a few points spring to mind.

krestivo-kdinfotech commented 5 years ago

Thanks, it seems the root cause is the java file making direct calls to log4j as in the known inadequacy you helpfully provided in your link. Nothing I can do about that; can't use timbre for this project. Closing. Thanks again.