diff options
author | Alexander Taggart <alex.taggart@expojure.com> | 2011-05-18 09:36:42 -0700 |
---|---|---|
committer | Alexander Taggart <alex.taggart@expojure.com> | 2011-05-18 09:36:42 -0700 |
commit | c4810ab19657bd82ad94efe5551db1d338aad23c (patch) | |
tree | f404760b1894f6ddcf0130d2fcdb020370c2e898 | |
parent | f07b9b3af1531b7b5b7ead5eed7f54b896ce6828 (diff) |
Fix CONTRIB-109: proper newline trimming
-rw-r--r-- | modules/logging/src/main/clojure/clojure/contrib/logging.clj | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/logging/src/main/clojure/clojure/contrib/logging.clj b/modules/logging/src/main/clojure/clojure/contrib/logging.clj index 99648a9e..147732f3 100644 --- a/modules/logging/src/main/clojure/clojure/contrib/logging.clj +++ b/modules/logging/src/main/clojure/clojure/contrib/logging.clj @@ -57,7 +57,9 @@ The above will print messages to the console for :debug or higher if one is in the user namespace, and :warn or higher in all other namespaces."} clojure.contrib.logging - [:use [clojure.pprint :only [code-dispatch pprint with-pprint-dispatch]]]) + [:use + [clojure.string :only [trim-newline]] + [clojure.pprint :only [code-dispatch pprint with-pprint-dispatch]]]) (defprotocol Log "The protocol through which macros will interact with an underlying logging @@ -183,7 +185,7 @@ (pprint '~expr) (print "=> ") (pprint a#)))] - (.substring s# 0 (dec (count s#))))) ; trim off the trailing newline + (trim-newline s#))) a#))) (defn log-stream |