Class: Kitchen::Logger::LogdevLogger
- Inherits:
-
Logger
- Object
- Logger
- Kitchen::Logger::LogdevLogger
- 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
Instance Method Summary collapse
-
#<<(msg) ⇒ Object
Dump one or more messages to info.
-
#banner(msg = nil, &block) ⇒ Object
Log a banner message.
Instance Method Details
#<<(msg) ⇒ Object
Dump one or more messages to info.
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 |
#banner(msg = nil, &block) ⇒ Object
Log a banner message.
356 357 358 |
# File 'lib/kitchen/logger.rb', line 356 def (msg = nil, &block) super_info("-----> #{msg}", &block) end |