Module: Dis::Logging
- Included in:
- Layer
- Defined in:
- lib/dis/logging.rb
Instance Method Summary collapse
Instance Method Details
#debug_log(message, &block) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/dis/logging.rb', line 5 def debug_log(, &block) result = nil duration = Benchmark.realtime { result = block.call } * 1000 logger.debug(format("[Dis] %<message>s (%<duration>.1fms)", message:, duration:)) result end |
#logger ⇒ Object
14 15 16 |
# File 'lib/dis/logging.rb', line 14 def logger Rails.logger end |