rap1ds 2021-02-08T12:55:59.070200Z

For quite some time I was doing option 1. However, I kept facing this issue again and again and this week I had enough :) It's kinda waste of time to first build your subscription chain and then at some point understand that you need this value in an event handler which means that you need to refactor all the subscriptions and extract the computation functions. And of course, things get more complicated with longer subscription chains. So I finally decided to install re-frame-utils and start using the inject-sub. I've been very happy with it. I'd maybe recommend to skip the option 1 and move straight to 2, you'll eventully want to do that anyway :)


thanks @rap1ds, I’ve done the 1st one already, this is a small page/component so maybe this is not going top happen any time soon, but next time I know where to look

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


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

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

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


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


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


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!

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