aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-07-20 05:06:45 -0700
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-07-20 05:06:45 -0700
commit3a07fdcf85672ac9727d9abe2a296a3b7c13c1c1 (patch)
tree3b02fe56360437cd30f98cfe5a38fcd645593159
parentcabb4471afd51968121f6a94b4b161183fc223aa (diff)
parentb0ab8dc0b2b0f580ffe5ac9ff57fd13152e18577 (diff)
downloadrails-3a07fdcf85672ac9727d9abe2a296a3b7c13c1c1.tar.gz
rails-3a07fdcf85672ac9727d9abe2a296a3b7c13c1c1.tar.bz2
rails-3a07fdcf85672ac9727d9abe2a296a3b7c13c1c1.zip
Merge pull request #7106 from LTe/default_separator_updated
Use join without default separator in tagged logger
-rw-r--r--activesupport/lib/active_support/tagged_logging.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/tagged_logging.rb b/activesupport/lib/active_support/tagged_logging.rb
index 5e080df518..9cd8ac36bc 100644
--- a/activesupport/lib/active_support/tagged_logging.rb
+++ b/activesupport/lib/active_support/tagged_logging.rb
@@ -16,7 +16,7 @@ module ActiveSupport
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 @@ module ActiveSupport
def tags_text
tags = current_tags
if tags.any?
- tags.collect { |tag| "[#{tag}] " }.join
+ tags.collect { |tag| "[#{tag}]" }.join(' ')
end
end
end