Module: Hammock::BufferedLoggerPatches::InstanceMethods

Defined in:
lib/hammock/monkey_patches/logger.rb

Instance Method Summary collapse

Instance Method Details

#fatal_with_color(message = nil, progname = nil, &block) ⇒ Object



20
21
22
23
24
# File 'lib/hammock/monkey_patches/logger.rb', line 20

def fatal_with_color message = nil, progname = nil, &block
  first_line, other_lines = message.strip.split("\n", 2)
  fatal_without_color "\n" + first_line.colorize('on red'), progname, &block
  fatal_without_color other_lines.colorize('red') + "\n\n", progname, &block
end