From 61943fb33d9c0a71722e7cc67e69617b8912fc2d Mon Sep 17 00:00:00 2001 From: Pedro Pombeiro Date: Fri, 7 Jun 2019 07:50:59 +0200 Subject: [PATCH] Make calls to logging functions create deterministic code --- project.clj | 2 +- src/taoensso/timbre.cljx | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/project.clj b/project.clj index b70514a..be8337c 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject com.taoensso/timbre "4.10.0" +(defproject status-im/timbre "4.10.0-status" :author "Peter Taoussanis " :description "Pure Clojure/Script logging library" :url "https://github.com/ptaoussanis/timbre" diff --git a/src/taoensso/timbre.cljx b/src/taoensso/timbre.cljx index 2aab93e..1c790f4 100644 --- a/src/taoensso/timbre.cljx +++ b/src/taoensso/timbre.cljx @@ -535,14 +535,17 @@ ;; NB waiting on CLJ-865: ?line (fline &form)}} opts - ?file (when (not= ?file "NO_SOURCE_PATH") ?file) + ?file (when (not= ?file "NO_SOURCE_PATH") (-> + ?file + (str/split #"/") + (last))) ;; Identifies this particular macro expansion; note that this'll ;; be fixed for any fns wrapping `log!` (notably `tools.logging`, ;; `slf4j-timbre`, etc.): callsite-id (hash [level msg-type args ; Unevaluated args (arg forms) - ?ns-str ?file ?line (rand)])] + ?ns-str ?file ?line])] `(-log! ~config ~level ~?ns-str ~?file ~?line ~msg-type ~?err (delay [~@args]) ~?base-data ~callsite-id)))))