From a38dceff3b84c02299a9f0658e744e7fbcf93be2 Mon Sep 17 00:00:00 2001 From: Peter Taoussanis Date: Sun, 18 Dec 2016 11:59:55 +0100 Subject: [PATCH] Default output fn: try use ?file when ?ns-str unavailable --- src/taoensso/timbre.cljx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/taoensso/timbre.cljx b/src/taoensso/timbre.cljx index 5ca1a5d..c0d2ae7 100644 --- a/src/taoensso/timbre.cljx +++ b/src/taoensso/timbre.cljx @@ -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]