Class: TerraformWrapper::Shared::Logger

Inherits:
Logger
  • Object
show all
Defined in:
lib/terraform-wrapper/shared/logger.rb

Instance Method Summary collapse

Instance Method Details

#colourObject



23
24
25
# File 'lib/terraform-wrapper/shared/logger.rb', line 23

def colour()
  @colour
end

#colour=(enabled) ⇒ Object



29
30
31
# File 'lib/terraform-wrapper/shared/logger.rb', line 29

def colour=(enabled)
  @colour = [ true, false ].include?(enabled) ? enabled : false
end

#error(message) ⇒ Object



47
48
49
# File 'lib/terraform-wrapper/shared/logger.rb', line 47

def error(message)
  super(format(colour: 31, message: message))
end

#fatal(message) ⇒ Object



53
54
55
56
# File 'lib/terraform-wrapper/shared/logger.rb', line 53

def fatal(message)
  super(format(colour: 31, message: message))
  exit(1)
end

#success(message) ⇒ Object



35
36
37
# File 'lib/terraform-wrapper/shared/logger.rb', line 35

def success(message)
  info(format(colour: 32, message: message))
end

#warn(message) ⇒ Object



41
42
43
# File 'lib/terraform-wrapper/shared/logger.rb', line 41

def warn(message)
  super(format(colour: 33, message: message))
end