From 4a20bfe7fcdbeed16330070b62e0d7cd255a4dcd Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 20 May 2010 16:47:25 -0700 Subject: [PATCH] Plain logger should emit a newline --- lib/vagrant/util/plain_logger.rb | 2 +- test/vagrant/util/plain_logger_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/vagrant/util/plain_logger.rb b/lib/vagrant/util/plain_logger.rb index 5d0a6c52b..b3715b6d1 100644 --- a/lib/vagrant/util/plain_logger.rb +++ b/lib/vagrant/util/plain_logger.rb @@ -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 diff --git a/test/vagrant/util/plain_logger_test.rb b/test/vagrant/util/plain_logger_test.rb index 5a9cc5346..6c5cf61a2 100644 --- a/test/vagrant/util/plain_logger_test.rb +++ b/test/vagrant/util/plain_logger_test.rb @@ -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