mirror of https://github.com/status-im/timbre.git
Make calls to logging functions create deterministic code
This commit is contained in:
parent
22603b5134
commit
61943fb33d
|
@ -1,4 +1,4 @@
|
|||
(defproject com.taoensso/timbre "4.10.0"
|
||||
(defproject status-im/timbre "4.10.0-status"
|
||||
:author "Peter Taoussanis <https://www.taoensso.com>"
|
||||
:description "Pure Clojure/Script logging library"
|
||||
:url "https://github.com/ptaoussanis/timbre"
|
||||
|
|
|
@ -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)))))
|
||||
|
|
Loading…
Reference in New Issue