Class: Kitchen::Logger::LogdevLogger

Inherits:
Logger
  • Object
show all
Defined in:
lib/kitchen/logger.rb

Overview

Internal class which adds a #banner method call that displays the message with a callout arrow.

Direct Known Subclasses

StdoutLogger

Instance Method Summary collapse

Instance Method Details

#<<(msg) ⇒ Object

Dump one or more messages to info.

Parameters:

  • msg (String)

    a message



344
345
346
347
348
349
350
351
# File 'lib/kitchen/logger.rb', line 344

def <<(msg)
  @buffer ||= ""
  @buffer += msg
  while (i = @buffer.index("\n"))
    format_line(@buffer[0, i].chomp)
    @buffer[0, i + 1] = ""
  end
end

Log a banner message.

Parameters:

  • msg (String) (defaults to: nil)

    a message



356
357
358
# File 'lib/kitchen/logger.rb', line 356

def banner(msg = nil, &block)
  super_info("-----> #{msg}", &block)
end