Better compatibility with existing formatters.
diff --git a/lib/logger/buffer.rb b/lib/logger/buffer.rb index 9a2ba87..9843f57 100644 --- a/lib/logger/buffer.rb +++ b/lib/logger/buffer.rb
@@ -2,8 +2,9 @@ class Logger class Buffer - def initialize(io = StringIO.new, prefix = '[...]') + def initialize(io = StringIO.new, prefix = "\t") @io = io + @first = true @prefix = prefix end @@ -11,7 +12,12 @@ def puts(*args) args.each do |arg| - @io.puts "#{@prefix}#{arg}" + if @first + @io.puts arg + @first = false + else + @io.puts "#{@prefix}#{arg}" + end end end end