Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrap-with-body logger missing timbre #10

Closed
fzakaria opened this issue Oct 1, 2015 · 3 comments
Closed

wrap-with-body logger missing timbre #10

fzakaria opened this issue Oct 1, 2015 · 3 comments

Comments

@fzakaria
Copy link

fzakaria commented Oct 1, 2015

Can you give a better idea on how to call wrap-with-body-logger if we are using timbre.
The function definition seems to be different than that of wrap-with-logger which I'm not sure why.

@nberger
Copy link
Owner

nberger commented Oct 1, 2015

When using timbre, wrap-with-body-logger would be used as following:

(require '[ring.logger.timbre :refer [make-timbre-logger]])

(def handler (-> app
                 wrap-with-logger
                 (wrap-with-body-logger (make-timbre-logger)))

wrap-with-body-logger takes just the handler and the logger, because there are no additional options like in wrap-with-logger.

Btw, I just checked in 0.7.2 and wrap-with-body-logger is not working at all. Will be releasing ring-logger 0.7.3 with a fix soon.

@nberger
Copy link
Owner

nberger commented Oct 1, 2015

Just released [ring-logger "0.7.4"] and [ring-logger-timbre "0.7.4"] including some bugfixes and adding logger.timbre/wrap-with-body-logger so you can now do:

(require '[ring.logger.timbre :as logger.timbre])

(def handler (-> app
                 logger.timbre/wrap-with-logger
                 logger.timbre/wrap-with-body-logger))

@fzakaria
Copy link
Author

fzakaria commented Oct 1, 2015

Wicked.
Thanks for the quick fix.

@fzakaria fzakaria closed this as completed Oct 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants