Class: TerraformWrapper::Shared::Logger
- Inherits:
-
Logger
- Object
- Logger
- TerraformWrapper::Shared::Logger
- Defined in:
- lib/terraform-wrapper/shared/logger.rb
Instance Method Summary collapse
- #colour ⇒ Object
- #colour=(enabled) ⇒ Object
- #error(message) ⇒ Object
- #fatal(message) ⇒ Object
- #success(message) ⇒ Object
- #warn(message) ⇒ Object
Instance Method Details
#colour ⇒ Object
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() super(format(colour: 31, message: )) end |
#fatal(message) ⇒ Object
53 54 55 56 |
# File 'lib/terraform-wrapper/shared/logger.rb', line 53 def fatal() super(format(colour: 31, message: )) exit(1) end |
#success(message) ⇒ Object
35 36 37 |
# File 'lib/terraform-wrapper/shared/logger.rb', line 35 def success() info(format(colour: 32, message: )) end |
#warn(message) ⇒ Object
41 42 43 |
# File 'lib/terraform-wrapper/shared/logger.rb', line 41 def warn() super(format(colour: 33, message: )) end |