Want to output JSON instead of edn form pedestal.log... is there a way to globally override :io.pedestal.log/formatter
?
@souenzzo Itβs worth considering. Perhaps open an issue capturing the desire?
if you like the idea i can create a PR
Thanks, will look into it further tomorrow
Thanks, @souenzzo!
I've created wrapper macros, but that doesn't seem very nice:
(def formatter json/encode)
(defmacro trace [& keyvals] `(pedestal-log/trace ::pedestal-log/formatter formatter ~@keyvals))
(defmacro debug [& keyvals] `(pedestal-log/debug ::pedestal-log/formatter formatter ~@keyvals))
(defmacro info [& keyvals] `(pedestal-log/info ::pedestal-log/formatter formatter ~@keyvals))
(defmacro warn [& keyvals] `(pedestal-log/warn ::pedestal-log/formatter formatter ~@keyvals))
(defmacro error [& keyvals] `(pedestal-log/error ::pedestal-log/formatter formatter ~@keyvals))