mirror of
https://github.com/status-im/re-frame.git
synced 2025-02-24 15:58:36 +00:00
Merge pull request #395 from saskali/warning-on-tracing-not-set
Log warning when tracing not enabled
This commit is contained in:
commit
c43192f006
@ -27,7 +27,9 @@
|
|||||||
"Registers a tracing callback function which will receive a collection of one or more traces.
|
"Registers a tracing callback function which will receive a collection of one or more traces.
|
||||||
Will replace an existing callback function if it shares the same key."
|
Will replace an existing callback function if it shares the same key."
|
||||||
[key f]
|
[key f]
|
||||||
(swap! trace-cbs assoc key f))
|
(if trace-enabled?
|
||||||
|
(swap! trace-cbs assoc key f)
|
||||||
|
(console :warn "Tracing is not enabled. Please set {\"re_frame.trace.trace_enabled_QMARK_\" true} in :closure-defines. See: https://github.com/Day8/re-frame-trace#installation.")))
|
||||||
|
|
||||||
(defn remove-trace-cb [key]
|
(defn remove-trace-cb [key]
|
||||||
(swap! trace-cbs dissoc key)
|
(swap! trace-cbs dissoc key)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user