Class: Tire::Rails::LogSubscriber
- Inherits:
-
Object
- Object
- Tire::Rails::LogSubscriber
- Defined in:
- lib/searchkick/logger.rb
Instance Method Summary collapse
-
#search(event) ⇒ Object
better output format.
Instance Method Details
#search(event) ⇒ Object
better output format
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/searchkick/logger.rb', line 7 def search(event) self.class.runtime += event.duration return unless logger.debug? payload = event.payload name = "%s (%.1fms)" % [payload[:name], event.duration] query = payload[:search].to_s debug " #{color(name, YELLOW, true)} #{query}" end |