Permalink
Browse files

TLOG-1: Fix wrong arity on logp calling log*.

  • Loading branch information...
1 parent 623c6df commit 687c1833c59ad1204c2a41cf0ed1f53be4a0fa8d Alexander Taggart committed Jun 1, 2011
Showing with 10 additions and 1 deletion.
  1. +1 −1 src/main/clojure/clojure/tools/logging.clj
  2. +9 −0 src/test/clojure/clojure/tools/test_logging.clj
View
2 src/main/clojure/clojure/tools/logging.clj
@@ -106,7 +106,7 @@
(if (impl-enabled? log# ~level)
(if (instance? Throwable ~x) ; type check only when enabled
(log* log# ~level ~x (print-str ~@more))
- (log* log# ~level (print-str ~x ~@more)))))))
+ (log* log# ~level nil (print-str ~x ~@more)))))))
(defmacro logf
"Logs a message using a format string and args. Can optionally take a
View
9 src/test/clojure/clojure/tools/test_logging.clj
@@ -136,6 +136,15 @@
(is (false? @flag))))
)
+(deftest logp-msg-no-optimize
+ (let [a "foo"
+ b "bar"]
+ (log/logp :debug a b))
+ (is (= ["clojure.tools.test-logging"
+ :debug
+ nil
+ "foo bar"]
+ (peek @*entries*))))
(deftest logp-msg1
(log/logp :debug "hello")

0 comments on commit 687c183

Please sign in to comment.