Improved handling of exceptions without extra arguments

* Will now use exception itself as primary message for rate-limiting, etc.

Signed-off-by: Peter Taoussanis <p.taoussanis@gmail.com>
This commit is contained in:
Peter Taoussanis 2012-05-28 22:23:56 +07:00
parent 78218b9f1c
commit 56e1ba9f7c
1 changed files with 2 additions and 1 deletions

View File

@ -190,7 +190,7 @@
:error? (>= (compare-levels level# :error) 0)
:instant (java.util.Date.)
:ns (str ~*ns*)
:message (if has-throwable?# (first xs#) x1#)
:message (if has-throwable?# (or (first xs#) x1#) x1#)
:more (if has-throwable?#
(conj (vec (rest xs#))
(str "\n" (stacktrace/pst-str x1#)))
@ -202,6 +202,7 @@
(comment (log :fatal "arg1")
(log :debug "arg1" "arg2")
(log :debug (Exception.) "arg1" "arg2")
(log :debug (Exception.))
(log :trace "arg1"))
(defmacro spy