Plain logger should emit a newline

This commit is contained in:
Mitchell Hashimoto 2010-05-20 16:47:25 -07:00
parent 91ae6178df
commit 4a20bfe7fc
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ module Vagrant
class PlainLogger < ::Logger
def format_message(level, time, progname, msg)
# We do no formatting, its up to the user
msg
"#{msg}\n"
end
end
end

View File

@ -10,8 +10,8 @@ class PlainLoggerUtilTest < Test::Unit::TestCase
assert @instance.is_a?(::Logger)
end
should "not attempt to format the message in any way" do
should "just add a newline to the message" do
msg = "foo bar baz"
assert_equal msg, @instance.format_message("1", "2", "3", msg)
assert_equal "#{msg}\n", @instance.format_message("1", "2", "3", msg)
end
end