Module: Msgr::Logging
- Included in:
- Binding, Client, Connection, Consumer, Dispatcher, Pool, Pool::Worker
- Defined in:
- lib/msgr/logging.rb
Instance Method Summary collapse
Instance Method Details
#log(level) ⇒ Object
4 5 6 |
# File 'lib/msgr/logging.rb', line 4 def log(level) Msgr.logger.send(level, self.log_name) { yield } if Msgr.logger end |
#log_name ⇒ Object
8 9 10 |
# File 'lib/msgr/logging.rb', line 8 def log_name "[#{Thread.current.object_id}] #{self.to_s}" end |