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