Module: ECSHelper::Logging
- Included in:
- Command::Base
- Defined in:
- lib/ecs_helper/logging.rb
Instance Method Summary collapse
- #console(message) ⇒ Object
- #error(message, code = 1) ⇒ Object
- #log(title, message = nil, color = "light_white") ⇒ Object
Instance Method Details
#console(message) ⇒ Object
2 3 4 |
# File 'lib/ecs_helper/logging.rb', line 2 def console() puts if ENV["SKIP_LOGS"] != 'true' end |
#error(message, code = 1) ⇒ Object
15 16 17 18 19 |
# File 'lib/ecs_helper/logging.rb', line 15 def error(, code = 1) console "Error".red console exit code end |
#log(title, message = nil, color = "light_white") ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/ecs_helper/logging.rb', line 6 def log(title, = nil, color = "light_white") if console title.send(color) console else console title end end |