-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
How to pretty print with Timbre #184
Comments
Hi Petrus, should be doable; would recommend looking into Timbre's middleware support. Cheers! |
I never managed to get this going. Anyone have a middleware sample with pretty-printing Timbre? |
@theronic (fn [data]
(update data :vargs (partial mapv #(if (string? %)
%
(with-out-str (pprint %))))))] The You could use (fn [x]
(condp #(%1 %2) x
string? (clojure.string/upper-case x)
neg? (str "minus " (* -1 x))
(with-out-str (pprint x)) |
Maybe include this example in the readme? |
@urzds In this case it could be added as a middleware in the repo itself. @ptaoussanis What do you think about this? |
Can I get Timbre to always pretty-print Clojure data structures, without modifying all my logging calls to Timbre?
The text was updated successfully, but these errors were encountered: