diff options
author | José Valim <jose.valim@gmail.com> | 2012-01-17 23:25:53 -0800 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-01-17 23:25:53 -0800 |
commit | 5065d17f706e2271837e759e25ba1cc291b916dc (patch) | |
tree | f5d9bd004c7e5450219610f093d26c28dc589bca | |
parent | 57aaaa61977e82b9de2c43c26b00e636030685c4 (diff) | |
parent | ffb0c5185c649f3ef132c9f308384e60a01de9b0 (diff) | |
download | rails-5065d17f706e2271837e759e25ba1cc291b916dc.tar.gz rails-5065d17f706e2271837e759e25ba1cc291b916dc.tar.bz2 rails-5065d17f706e2271837e759e25ba1cc291b916dc.zip |
Merge pull request #4508 from lest/patch-1
Refactor TaggedLogging
-rw-r--r-- | activesupport/lib/active_support/buffered_logger.rb | 3 | ||||
-rw-r--r-- | activesupport/lib/active_support/configurable.rb | 2 | ||||
-rw-r--r-- | activesupport/lib/active_support/tagged_logging.rb | 4 |
3 files changed, 2 insertions, 7 deletions
diff --git a/activesupport/lib/active_support/buffered_logger.rb b/activesupport/lib/active_support/buffered_logger.rb index 36e29644c6..0595446189 100644 --- a/activesupport/lib/active_support/buffered_logger.rb +++ b/activesupport/lib/active_support/buffered_logger.rb @@ -1,8 +1,5 @@ -require 'thread' -require 'active_support/core_ext/class/attribute_accessors' require 'active_support/deprecation' require 'active_support/logger' -require 'fileutils' module ActiveSupport BufferedLogger = ActiveSupport::Deprecation::DeprecatedConstantProxy.new( diff --git a/activesupport/lib/active_support/configurable.rb b/activesupport/lib/active_support/configurable.rb index a2d2719de7..a8aa53a80f 100644 --- a/activesupport/lib/active_support/configurable.rb +++ b/activesupport/lib/active_support/configurable.rb @@ -1,7 +1,5 @@ require 'active_support/concern' require 'active_support/ordered_options' -require 'active_support/core_ext/kernel/singleton_class' -require 'active_support/core_ext/module/delegation' require 'active_support/core_ext/array/extract_options' module ActiveSupport diff --git a/activesupport/lib/active_support/tagged_logging.rb b/activesupport/lib/active_support/tagged_logging.rb index 4e2e1a1ff5..b60bc94db4 100644 --- a/activesupport/lib/active_support/tagged_logging.rb +++ b/activesupport/lib/active_support/tagged_logging.rb @@ -22,7 +22,7 @@ module ActiveSupport tags.concat new_tags yield ensure - new_tags.size.times { tags.pop } + tags.pop(new_tags.size) end def add(severity, message = nil, progname = nil, &block) @@ -51,7 +51,7 @@ module ActiveSupport def tags_text tags = current_tags if tags.any? - tags.collect { |tag| "[#{tag}]" }.join(" ") + " " + tags.collect { |tag| "[#{tag}] " }.join end end |