@flowthing That looks like the README hasn't been updated to reflect the code. Would you mind opening an issue for it?
I can make a PR.
Thanks
A newbie question. How can I use logger.timbre
in handlers? I don't know how to get the initialized logger/Logger
.
You can pass in a reference to :duct/logger
For example:
:app.handler/whatever
{:logger #ig/ref :duct/logger}
The :duct.module/logging
module sets the configuration up with default logging configurations for both dev and prod.
In your handler itself, you'd access the logger like:
(defmethod ig/init-key :app.handler/whatever [_ {:keys [logger]}]
(log/log logger :info ::message))
Newer versions of the duct/logger library also allow for (log/info logger ::message)
as a shortcut.