Module: Postgres::Clone::Logger

Included in:
CommandLine, Commands, RemoteCommands
Defined in:
lib/postgres/clone/logger.rb

Constant Summary collapse

DEFAULT_COLOR =
:blue

Instance Method Summary collapse

Instance Method Details

#log_message(message, color: DEFAULT_COLOR, header: nil, host_name: nil) ⇒ Object



8
9
10
11
# File 'lib/postgres/clone/logger.rb', line 8

def log_message(message, color: DEFAULT_COLOR, header: nil, host_name: nil)
  puts header unless header.nil?
  puts Rainbow("#{host_name.nil? ? '' : "[#{host_name}] "}#{message}").color(color)
end