Module: Msgr::Logging
- Included in:
- Binding, Channel, Client, Connection, Consumer, Dispatcher, Routes
- Defined in:
- lib/msgr/logging.rb
Instance Method Summary collapse
Instance Method Details
#log(level) ⇒ Object
5 6 7 8 9 |
# File 'lib/msgr/logging.rb', line 5 def log(level) # rubocop:disable Style/SafeNavigation - Msgr.logger can be false Msgr.logger.send(level) { "#{log_name} #{yield}" } if Msgr.logger # rubocop:enable all end |
#log_name ⇒ Object
11 12 13 |
# File 'lib/msgr/logging.rb', line 11 def log_name "[#{Thread.current.object_id.to_s(16)}]" end |