Class: ThinkingSphinx::ActiveRecord::LogSubscriber
- Inherits:
-
ActiveSupport::LogSubscriber
- Object
- ActiveSupport::LogSubscriber
- ThinkingSphinx::ActiveRecord::LogSubscriber
- Defined in:
- lib/thinking_sphinx/active_record/log_subscriber.rb
Instance Method Summary collapse
Instance Method Details
#message(event) ⇒ Object
7 8 9 10 |
# File 'lib/thinking_sphinx/active_record/log_subscriber.rb', line 7 def (event) identifier = color 'Sphinx', GREEN, true debug " #{identifier} #{event.payload[:message]}" end |
#query(event) ⇒ Object
2 3 4 5 |
# File 'lib/thinking_sphinx/active_record/log_subscriber.rb', line 2 def query(event) identifier = color('Sphinx Query (%.1fms)' % event.duration, GREEN, true) debug " #{identifier} #{event.payload[:query]}" end |