Cljs console appender: allow late .-log binding

This commit is contained in:
Peter Taoussanis 2016-07-23 11:56:31 +07:00
parent b1592fb002
commit 2822efe513
1 changed files with 2 additions and 2 deletions

View File

@ -112,7 +112,7 @@
:rate-limit nil
:output-fn :inherit
:fn
(if (and (exists? js/console) js/console.log)
(if (exists? js/console)
(let [;; Don't cache this; some libs dynamically replace js/console
level->logger
(fn [level]
@ -128,7 +128,7 @@
js/console.log))]
(fn [data]
(let [logger (level->logger (:level data))]
(when-let [logger (level->logger (:level data))]
(if (or (:raw-console? data)
(get-in data [:?meta :raw-console?])) ; Undocumented