Class: ThinkingSphinx::ActiveRecord::LogSubscriber

Inherits:
ActiveSupport::LogSubscriber
  • Object
show all
Defined in:
lib/thinking_sphinx/active_record/log_subscriber.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) message(event)



7
8
9
10
# File 'lib/thinking_sphinx/active_record/log_subscriber.rb', line 7

def message(event)
  identifier = color 'Sphinx', GREEN, true
  debug "  #{identifier}  #{event.payload[:message]}"
end

- (Object) query(event)



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