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



514
515
516
# File 'lib/kitchen/logger.rb', line 514

def <<(msg)
  line_buffer << msg
end

Log a banner message.

Parameters:

  • msg (String) (defaults to: nil)

    a message



521
522
523
524
525
526
527
# File 'lib/kitchen/logger.rb', line 521

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