Default output fn: try use ?file when ?ns-str unavailable

This commit is contained in:
Peter Taoussanis 2016-12-18 11:59:55 +01:00
parent 4eb8433f8e
commit a38dceff3b
1 changed files with 2 additions and 2 deletions

View File

@ -38,13 +38,13 @@
([ data] (default-output-fn nil data))
([opts data] ; For partials
(let [{:keys [no-stacktrace? stacktrace-fonts]} opts
{:keys [level ?err #_vargs msg_ ?ns-str hostname_
{:keys [level ?err #_vargs msg_ ?ns-str ?file hostname_
timestamp_ ?line]} data]
(str
#+clj (force timestamp_) #+clj " "
#+clj (force hostname_) #+clj " "
(str/upper-case (name level)) " "
"[" (or ?ns-str "?") ":" (or ?line "?") "] - "
"[" (or ?ns-str ?file "?") ":" (or ?line "?") "] - "
(force msg_)
(when-not no-stacktrace?
(when-let [err ?err]