From c4810ab19657bd82ad94efe5551db1d338aad23c Mon Sep 17 00:00:00 2001 From: Alexander Taggart Date: Wed, 18 May 2011 09:36:42 -0700 Subject: Fix CONTRIB-109: proper newline trimming --- modules/logging/src/main/clojure/clojure/contrib/logging.clj | 6 ++++-- 1 file 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 -- cgit v1.2.3-18-g5258