My concern is it adds another chance of being tricked, e.g.:

(catch Exception e
  (debug "got exception:" e))

One could be forgiven for thinking this would log a line containing the
toString of the exception, but if the logging implementation wasn't
configured to display the 'throwable' on debug, then the only thing
appearing in the logs would be "got exception:".

I'm inclined to borrow Chris Dean's idea (which I use in the original java
version of c.c.l), and add format.  Give me a few minutes to think on it.

-Alex


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

Reply via email to