mirror of https://github.com/status-im/timbre.git
Add `stacktrace` option to control aviso-ex fonts
This commit is contained in:
parent
d8178eca16
commit
f83b417cb0
|
@ -33,9 +33,14 @@
|
|||
[& body] `(binding [*err* *out*] ~@body))
|
||||
|
||||
(defn stacktrace "Default stacktrace formatter for use by appenders, etc."
|
||||
[throwable & [separator]]
|
||||
[throwable & [separator stacktrace-fonts]]
|
||||
(when throwable
|
||||
(str separator (aviso-ex/format-exception throwable))))
|
||||
(str separator
|
||||
(if-let [fonts stacktrace-fonts]
|
||||
(binding [aviso-ex/*fonts* fonts] (aviso-ex/format-exception throwable))
|
||||
(aviso-ex/format-exception throwable)))))
|
||||
|
||||
(comment (stacktrace (Exception. "foo") nil {}))
|
||||
|
||||
;;;; Logging levels
|
||||
;; Level precendence: compile-time > dynamic > atom
|
||||
|
|
Loading…
Reference in New Issue