mirror of https://github.com/status-im/timbre.git
Cljs console appender: allow late .-log binding
This commit is contained in:
parent
b1592fb002
commit
2822efe513
|
@ -112,7 +112,7 @@
|
||||||
:rate-limit nil
|
:rate-limit nil
|
||||||
:output-fn :inherit
|
:output-fn :inherit
|
||||||
:fn
|
:fn
|
||||||
(if (and (exists? js/console) js/console.log)
|
(if (exists? js/console)
|
||||||
(let [;; Don't cache this; some libs dynamically replace js/console
|
(let [;; Don't cache this; some libs dynamically replace js/console
|
||||||
level->logger
|
level->logger
|
||||||
(fn [level]
|
(fn [level]
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
js/console.log))]
|
js/console.log))]
|
||||||
|
|
||||||
(fn [data]
|
(fn [data]
|
||||||
(let [logger (level->logger (:level data))]
|
(when-let [logger (level->logger (:level data))]
|
||||||
|
|
||||||
(if (or (:raw-console? data)
|
(if (or (:raw-console? data)
|
||||||
(get-in data [:?meta :raw-console?])) ; Undocumented
|
(get-in data [:?meta :raw-console?])) ; Undocumented
|
||||||
|
|
Loading…
Reference in New Issue