Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mod] [#356] Call
pr-str
on non-string arguments
Change (both Clj and Cljs): For print-style logging commands (`debug`, `info`, etc.): By default, `pr-str` (rather than `str`) is now called on all non-string arguments when generating `:msg_` and `:output_` vals in Timbre's log data map. I.e. will affect generated output. For format-style logging commands (`debugf`, `infof`, etc.): No change since format-style logging commands presume that a format pattern will explicitly specify the desired formatting, so arguments are not automatically formatted. I.e. should not affect generated output. Motivation: My hope is that this change should be positive or neutral for the vast majority of users. There are several known cases where `pr-str` produces better output (e.g. for JS objects in Cljs), and currently no known cases where `pr-str` produces worse output (though please ping me if you know of something!). To customise this behaviour (message generation), see the `default-output-fn` docstring.
- Loading branch information