Module: Minfra::Cli::Logging

Instance Method Summary collapse

Instance Method Details

#debug(str) ⇒ Object



23
24
25
# File 'lib/minfra/cli/logging.rb', line 23

def debug(str)
  logger.debug(str)
end

#deprecated(comment) ⇒ Object



27
28
29
# File 'lib/minfra/cli/logging.rb', line 27

def deprecated(comment)
  logger.warn "DEPRECATED: #{comment}"
end

#error(str) ⇒ Object



6
7
8
# File 'lib/minfra/cli/logging.rb', line 6

def error(str)
  logger.error(colored(str, :red))
end

#exit_error(str) ⇒ Object



10
11
12
13
# File 'lib/minfra/cli/logging.rb', line 10

def exit_error(str)
  error str
  raise Minfra::Cli::Errors::ExitError, str
end

#info(str) ⇒ Object



15
16
17
# File 'lib/minfra/cli/logging.rb', line 15

def info(str)
  logger.info str
end

#warn(str) ⇒ Object



19
20
21
# File 'lib/minfra/cli/logging.rb', line 19

def warn(str)
  logger.warn(colored(str, :yellow))
end