Skip to content

Commit

Permalink
Fix CONTRIB-109: proper newline trimming
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Taggart committed May 18, 2011
1 parent c4efe5d commit 623c6df
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/clojure/clojure/tools/logging.clj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
runtime a specific implementation is selected from, in order, Apache
commons-logging, slf4j, log4j, and finally java.util.logging."}
clojure.tools.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
Expand Down Expand Up @@ -141,7 +143,7 @@
(pprint '~expr)
(print "=> ")
(pprint a#)))]
(.substring s# 0 (dec (count s#))))) ; trim off the trailing newline
(trim-newline s#)))
a#)))

(defn log-stream
Expand Down

0 comments on commit 623c6df

Please sign in to comment.