Details
-
Type:
Defect
-
Status:
Closed
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
Currently the runtime value of ns is used to namespace calls to log, instead of the ns of the code that calls log. For example:
user=> (ns foo (:use (clojure.contrib logging)))
nil
foo=> (defn bar [] (log :fatal "in foo/bar"))
#'foo/bar
foo=> (bar)
#<Agent@4f961bac...>
foo=> (ns baz (:use (clojure.contrib logging)))
nil
baz=> (foo/bar)
#<Agent@4f961bac...></code></pre>
and the output to the log is:
<pre><code>2009-08-06 11:05:19,817 FATAL foo - / - in foo/bar
2009-08-06 11:05:38,167 FATAL baz - / - in foo/bar
The second printed namespace is "baz" and it should be the same as the first, "foo".
Converted from http://www.assembla.com/spaces/clojure/tickets/11
Attachments:
logging-11.diff - https://www.assembla.com/spaces/clojure/documents/cnaHiKGR4r3RZOeJe5afGb/download/cnaHiKGR4r3RZOeJe5afGb