I use SLF4J and Logback in my projects, and typically do all my logging using tools.logging. Every time I have to use a library that uses timbre, I have never been able to get the right code added to my project to see anything logged.
What is the minimum configuration I need in my project to make sure that timbre logging is active and make timbre redirect all logging to tools.logging (so that the timbre logging will appear in my logs)?
I've tried adding the following to my main namespace:
(timbre/merge-config! {:level :info :appenders {:tools-logging (com.palletops.log-config.timbre.tools-logging/make-tools-logging-appender {})}})This attempts to use the timbre->tools.logging bridge from the https://github.com/palletops/log-config project.
But I never see any logging.
If I take out the
:appenderssection above, I get nothing logged to the console (shouldn't timbre log to the console by default?).If I use the following, I still see nothing:
(timbre/merge-config! {:level :info :appenders {:standard-out {:enabled? true}}})even though I know that the library I'm using is make multiple calls to
taoensso.timbre/error
So what am I doing wrong here?
It is not the latest version of Timbre, but I have a demo here: