re-frame

https://github.com/Day8/re-frame/blob/master/docs/README.md https://github.com/Day8/re-frame/blob/master/docs/External-Resources.md
hadils 2021-02-08T19:26:06.073400Z

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-himik 2021-02-08T19:35:27.073500Z

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

hadils 2021-02-08T19:36:04.073700Z

No.

p-himik 2021-02-08T19:37:19.073900Z

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

hadils 2021-02-08T19:37:53.074100Z

No.

p-himik 2021-02-08T19:38:52.074300Z

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

hadils 2021-02-08T19:41:02.074500Z

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

p-himik 2021-02-08T19:41:38.074700Z

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

hadils 2021-02-08T19:44:48.074900Z

Yes.

p-himik 2021-02-08T19:46:16.075100Z

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

hadils 2021-02-08T19:48:15.075300Z

Yes.

p-himik 2021-02-08T19:48:44.075500Z

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

hadils 2021-02-08T19:49:14.075700Z

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

👍 1
p-himik 2021-02-08T19:50:31.076Z

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.

ingesol 2021-02-08T21:52:20.076200Z

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