Ok here's what I threw together: http://gist.github.com/275527
It adds both println-style args as well as a formatting version. I like the idea of the level-specific convenience macros behaving like print, but I'd prefer to move the throwable to be an optional first arg. I tried to make it so it's a not-quite-breaking change for extant code relying on the old two-arg form; worst-case they'll get an extra bit of text at the end of the message. Thoughts? On Mon, Jan 11, 2010 at 3:09 PM, Phil Hagelberg <p...@hagelb.org> wrote: > > I really like the clojure.contrib.logging library, but I find myself > often getting tricked into thinking it works like println: > > (info "Doing a thing with a vector: " my-vec) > > or > > (catch Exception e > (warn "Problem doing a thing with: " my-vec e)) > > Attached is a patch altering the logging library to behave this way by > accepting var-args and treating the last one as a throwable if applicable. > > What do you think? Do other people have the same problem I do? > > -Phil > >
-- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en