Don't double up newlines in the log
authorTom Hughes <tom@compton.nu>
Sun, 19 Feb 2012 10:52:54 +0000 (10:52 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 19 Feb 2012 10:52:54 +0000 (10:52 +0000)
config/initializers/buffered_logger.rb

index 03d88f69c694d60fc5a3cb40a1d8517dee1d682f..b75e74ec64f8580127b8540340b1d458946a9a90 100644 (file)
@@ -7,7 +7,7 @@ module ActiveSupport
       return if @level > severity
       message = (message || (block && block.call) || progname).to_s
       time = Time.now
-      message = "[%s.%06d #%d] %s\n" % [time.strftime("%Y-%m-%d %H:%M:%S"), time.usec, $$, message.sub(/^\n+/, "")]
+      message = "[%s.%06d #%d] %s" % [time.strftime("%Y-%m-%d %H:%M:%S"), time.usec, $$, message.sub(/^\n+/, "")]
       old_add(severity, message)
     end
   end