Fork me on GitHub
#announcements
<
2019-06-10
>
plexus16:06:45

New blog post and accompanying library: ClojureScript logging with goog.log

🔹 4
👍 1
martinklepsch16:06:03

ohhh! I've had this on my list for a looooong time!

martinklepsch16:06:59

@U07FP7QJ0 does this support logging clojure datastructures and having them formatted with cljs devtools?

martinklepsch16:06:26

I can't find a mention of this but I know that @U5H74UNSF and others have been working on something in that direction

plexus17:06:44

You can, see the part about using your own handler together with identity as a formatter. Maybe that should be made easier though.

martinklepsch17:06:13

That has always been an issue for me when using goog.log, could be worth highlighting this more in the announcement and mentioning cljs-devtools explicitly

athomasoriginal17:06:09

The GCL is truly a super power. It is not talked about enough so thank you for this :thumbsup:

plexus17:06:13

You're very welcome!

samedhi17:06:44

Kudos, well written and great for people getting started. We need more of this kind of stuff in the clojure community.

simple_smile 1
plexus17:06:24

@U050TNB9F thinking about it some more I think you'll have to use your own handler which copies some of the stuff from goog.debug.Console, in particular choosing the right js/console function based on the log level. The rest is fairly trivial. I'll see if I can add that to the post and library. (I hadn't really thought about that since I'm a firefox user, so no devtools for me).

flowthing19:06:31

>Giving your library a Finnish name is all the rage these days, so I’m going with Glögi (am I doing this right?). I can confirm that’s definitely a badass name.

🎯 1
martinklepsch22:06:47

Oh, yes! Completely forgot you complement you on your hype-ready naming strategy! 👌🙌😂

plexus09:06:11

I've also expanded the post to cover how to use this in CLJC files (combine with pedestal log), and to mention devtools.

manuel09:06:47

@U07FP7QJ0 minor typo here "It’s really good at what at does"

✔️ 1