Permalink
Browse files

Fix CONTRIB-109: proper newline trimming

  • Loading branch information...
1 parent f07b9b3 commit c4810ab19657bd82ad94efe5551db1d338aad23c Alexander Taggart committed May 18, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 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

0 comments on commit c4810ab

Please sign in to comment.