Fork me on GitHub
#re-frame
<
2021-02-08
>
hadils19:02:06

I have a n00b question. I cannot get the debug interceptor to work. I have read the docs thoroughly but can't get it to output to my console. goog.DEBUG is true as tested from my REPL and I tested js/console.debug and it printed to my console.

p-himik19:02:27

Have you overridden re-frame logging in any way with set-loggers!?

p-himik19:02:19

Does (re-frame.core/console :log "hello") work?

p-himik19:02:52

What does (re-frame.loggers/get-loggers) output?

hadils19:02:02

{:log #object[bound],
 :warn #object[bound n],
 :error #object[bound n],
 :debug #object[bound],
 :group #object[bound],
 :groupEnd #object[bound]}

p-himik19:02:38

Not really clear, OK. Does (js/console.log "hello") work?

p-himik19:02:16

Does (re-frame.core/console :log "hello") work after you run (re-frame.loggers/set-loggers! {:log (js/console.log.bind js/console)})?

p-himik19:02:44

Well, something in your code or in one of the libraries must be calling re-frame.loggers/set-loggers! and overriding the default loggers.

hadils19:02:14

Ok. I will reset them in my init...thanks for your help!

👍 3
p-himik19:02:31

One thing - you should call re-frame.core/set-loggers! instead of re-frame.loggers/set-loggers!. The latter is a private API - I was mentioning only because I was looking at that ns.

ingesol21:02:20

If this works the same way loggers like timbre do, you also need to enable verbose logging in chrome console. The dropdown is "Default levels" at the top