Permalink
Browse files

Use join without default separator

Use lstrip method
  • Loading branch information...
1 parent 2470501 commit b0ab8dc0b2b0f580ffe5ac9ff57fd13152e18577 @LTe LTe committed Jul 19, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 activesupport/lib/active_support/tagged_logging.rb
@@ -16,7 +16,7 @@ module TaggedLogging
module Formatter # :nodoc:
# This method is invoked when a log event occurs
def call(severity, timestamp, progname, msg)
- super(severity, timestamp, progname, "#{tags_text}#{msg}")
+ super(severity, timestamp, progname, "#{tags_text} #{msg}".lstrip)
end
def clear!
@@ -31,7 +31,7 @@ def current_tags
def tags_text
tags = current_tags
if tags.any?
- tags.collect { |tag| "[#{tag}] " }.join
+ tags.collect { |tag| "[#{tag}]" }.join(' ')
end
end
end

0 comments on commit b0ab8dc

Please sign in to comment.