Module: Bauble::Cli::Logger

Defined in:
lib/bauble/cli/logger.rb

Overview

cli logger

Class Method Summary collapse

Class Method Details

.block_log(message) ⇒ Object



14
15
16
17
18
# File 'lib/bauble/cli/logger.rb', line 14

def block_log(message)
  Logger.nl
  Logger.log message
  Logger.nl
end

.debug(message) ⇒ Object



32
33
34
# File 'lib/bauble/cli/logger.rb', line 32

def debug(message)
  puts "[ Bauble DEBUG ] #{message}".yellow if ENV['BAUBLE_DEBUG']
end

.docker(message) ⇒ Object



24
25
26
# File 'lib/bauble/cli/logger.rb', line 24

def docker(message)
  print "[ Docker ] #{message}".magenta
end

.error(message) ⇒ Object



36
37
38
39
40
# File 'lib/bauble/cli/logger.rb', line 36

def error(message)
  nl
  puts "[ Bauble Error ] #{message}".red
  nl
end

.log(message) ⇒ Object



10
11
12
# File 'lib/bauble/cli/logger.rb', line 10

def log(message)
  print "[ Bauble ] #{message}".green
end

.logoObject



42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/bauble/cli/logger.rb', line 42

def 
  puts <<-LOGO

  ██████╗  █████╗ ██╗   ██╗██████╗ ██╗     ███████╗
  ██╔══██╗██╔══██╗██║   ██║██╔══██╗██║     ██╔════╝
  ██████╔╝███████║██║   ██║██████╔╝██║     █████╗
  ██╔══██╗██╔══██║██║   ██║██╔══██╗██║     ██╔══╝
  ██████╔╝██║  ██║╚██████╔╝██████╔╝███████╗███████╗
  ╚═════╝ ╚═╝  ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝╚══════╝ v#{Bauble::VERSION}

  LOGO
end

.nl(times = 1) ⇒ Object



28
29
30
# File 'lib/bauble/cli/logger.rb', line 28

def nl(times = 1)
  times.times { puts }
end

.pulumi(message) ⇒ Object



20
21
22
# File 'lib/bauble/cli/logger.rb', line 20

def pulumi(message)
  print "[ Pulumi ] #{message}".blue
end