Any recommendations for (clojurescript) logging?

259 views
Skip to first unread message

Colin Yates

unread,
Nov 12, 2014, 10:29:13 AM11/12/14
to clojur...@googlegroups.com
Despite a plethora of great clojure logging libraries I can't find one that works in Clojurescript.

Any recommendations?

Colin Yates

unread,
Nov 12, 2014, 10:53:13 AM11/12/14
to clojur...@googlegroups.com
So having spent 5 minutes writing one now know why there aren't any.

If you have a library then all the invocations appear to come from that library in js/console rather than the call site of the log/info invocation. OK, macros solve this problem, except we can't do that in clojurescript.

js/console it is :).

Max Gonzih

unread,
Nov 13, 2014, 6:04:27 AM11/13/14
to clojur...@googlegroups.com
On Wednesday, November 12, 2014 4:29:13 PM UTC+1, Colin Yates wrote:
> Despite a plethora of great clojure logging libraries I can't find one that works in Clojurescript.
>
> Any recommendations?

(enable-console-print!)
(prn :test)
(println :test2)
(print :test3)

Eduard Bondarenko

unread,
Nov 13, 2014, 8:17:23 AM11/13/14
to clojur...@googlegroups.com
There is also https://github.com/noprompt/shodan but I never need
that, prn is enough for me.
> --
> Note that posts from new members are moderated - please be patient with your first post.
> ---
> You received this message because you are subscribed to the Google Groups "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clojurescrip...@googlegroups.com.
> To post to this group, send email to clojur...@googlegroups.com.
> Visit this group at http://groups.google.com/group/clojurescript.

Rory Douglas

unread,
Nov 13, 2014, 8:45:50 AM11/13/14
to clojur...@googlegroups.com
Likely overkill but might be useful to you https://github.com/spellhouse/clairvoyant

Colin Yates

unread,
Nov 13, 2014, 8:58:32 AM11/13/14
to clojur...@googlegroups.com
That tracing library looks fab - thanks!

On 13 November 2014 13:45, Rory Douglas <rory1d...@gmail.com> wrote:
> Likely overkill but might be useful to you https://github.com/spellhouse/clairvoyant
>
> --
> Note that posts from new members are moderated - please be patient with your first post.
> ---
> You received this message because you are subscribed to a topic in the Google Groups "ClojureScript" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojurescript/APQirM9mdp8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to clojurescrip...@googlegroups.com.

Tim Gilbert

unread,
Dec 2, 2014, 5:30:09 PM12/2/14
to clojur...@googlegroups.com
Actually the shodan library has recently* added some macros, so that when you say (console/log "some text"), the reported line number in the browser console will link you to the line in your clojurescript source where you called console/log, instead of the line in the library where (.log js/console "some text") is actually invoked. Works like a charm!

* https://github.com/noprompt/shodan/issues/2
Reply all
Reply to author
Forward
0 new messages