class ThinkingSphinx::ActiveRecord::LogSubscriber

Public Instance Methods

caution(event) click to toggle source
# File lib/thinking_sphinx/active_record/log_subscriber.rb, line 17
def caution(event)
  identifier = color 'Sphinx', GREEN, true
  warn "  #{identifier}  #{event.payload[:caution]}"
end
guard(event) click to toggle source
# File lib/thinking_sphinx/active_record/log_subscriber.rb, line 2
def guard(event)
  identifier = color 'Sphinx', GREEN, true
  warn "  #{identifier}  #{event.payload[:guard]}"
end
message(event) click to toggle source
# 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
query(event) click to toggle source
# File lib/thinking_sphinx/active_record/log_subscriber.rb, line 12
def query(event)
  identifier = color('Sphinx Query (%.1fms)' % event.duration, GREEN, true)
  debug "  #{identifier}  #{event.payload[:query]}"
end