Module: Bukelatta::Logger::Helper
Instance Method Summary collapse
Instance Method Details
#log(level, message, log_options = {}) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/bukelatta/logger.rb', line 19 def log(level, , = {}) global_option = || {} = "[#{level.to_s.upcase}] #{message}" unless level == :info << ' (dry-run)' if global_option[:dry_run] = .send([:color]) if [:color] logger = global_option[:logger] || Bukelatta::Logger.instance logger.send(level, ) end |