Add :file and :line appender args (thanks to jarppe for suggestion)

This commit is contained in:
Peter Taoussanis 2013-08-07 12:18:46 +07:00
parent 8789358c7d
commit 382f9d4f9a
1 changed files with 3 additions and 1 deletions

View File

@ -310,7 +310,7 @@
[level] (and (sufficient-level? level) (@ns-filter-cache *ns*))) [level] (and (sufficient-level? level) (@ns-filter-cache *ns*)))
(defmacro log* (defmacro log*
"Implementation detail - subject to change.. "Implementation detail - subject to change.
Prepares given arguments for, and then dispatches to all level-relevant Prepares given arguments for, and then dispatches to all level-relevant
appender-fns. " appender-fns. "
@ -321,6 +321,8 @@
(conj (or ~base-appender-args {}) (conj (or ~base-appender-args {})
{:instant (Date.) {:instant (Date.)
:ns ~ns :ns ~ns
:file ~*file*
:line ~(:line (meta &form))
:level ~level :level ~level
:error? (error-level? ~level) :error? (error-level? ~level)
:args ~log-vargs ; No native tools.logging support :args ~log-vargs ; No native tools.logging support