Fork me on GitHub

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

🔹 4
👍 1

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


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


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


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


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


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


You're very welcome!


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

simple_smile 1

@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).


>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

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


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


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

✔️ 1