Plain logger should emit a newline
This commit is contained in:
parent
91ae6178df
commit
4a20bfe7fc
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue