Module: Roadworker::Log
- Included in:
- Batch, Batch::Operation, Client, DSL::Tester, Route53Wrapper::HostedzoneCollectionWrapper, Route53Wrapper::HostedzoneWrapper, Route53Wrapper::ResourceRecordSetCollectionWrapper, Route53Wrapper::ResourceRecordSetWrapper
- Defined in:
- lib/roadworker/log.rb
Instance Method Summary collapse
Instance Method Details
#log(level, message, color, log_id = nil, dry_run: @dry_run || (@options && @options.dry_run), logger: @logger || @options.logger) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/roadworker/log.rb', line 4 def log(level, , color, log_id = nil, dry_run: @dry_run || (@options && @options.dry_run), logger: @logger || @options.logger) log_id = yield if block_given? = "#{}: #{log_id}" if log_id << ' (dry-run)' if dry_run = Roadworker::StringHelper.public_send(color, ) if color logger.send(level, ) end |