mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Revert "Merge pull request #7084 from LTe/logger_default_separator"
This reverts commitc08f30ff5f
, reversing changes made toe243a8a32e
.
This commit is contained in:
parent
fe5b943d9f
commit
e482100d6e
2 changed files with 3 additions and 14 deletions
|
@ -31,7 +31,7 @@ module ActiveSupport
|
||||||
def tags_text
|
def tags_text
|
||||||
tags = current_tags
|
tags = current_tags
|
||||||
if tags.any?
|
if tags.any?
|
||||||
tags.collect { |tag| "[#{tag}] " }.join('')
|
tags.collect { |tag| "[#{tag}] " }.join
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -10,13 +10,8 @@ class TaggedLoggingTest < ActiveSupport::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
setup do
|
setup do
|
||||||
@output = StringIO.new
|
@output = StringIO.new
|
||||||
@logger = ActiveSupport::TaggedLogging.new(MyLogger.new(@output))
|
@logger = ActiveSupport::TaggedLogging.new(MyLogger.new(@output))
|
||||||
@separator = $,
|
|
||||||
end
|
|
||||||
|
|
||||||
after do
|
|
||||||
$, = @separator
|
|
||||||
end
|
end
|
||||||
|
|
||||||
test "tagged once" do
|
test "tagged once" do
|
||||||
|
@ -74,10 +69,4 @@ class TaggedLoggingTest < ActiveSupport::TestCase
|
||||||
|
|
||||||
assert_equal "[BCX] [Jason] Funky time\n[BCX] Junky time!\n", @output.string
|
assert_equal "[BCX] [Jason] Funky time\n[BCX] Junky time!\n", @output.string
|
||||||
end
|
end
|
||||||
|
|
||||||
test "using the correct separator" do
|
|
||||||
$, = "_"
|
|
||||||
@logger.tagged("BCX", "BDX") { @logger.info "Funky time" }
|
|
||||||
assert_equal "[BCX] [BDX] Funky time\n", @output.string
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue