Sha256: cb37dbfd9f7a143ee0525ea67c947aaf1fbccb6e9061efcca3928790e99a8647
Contents?: true
Size: 726 Bytes
Versions: 16
Compression:
Stored size: 726 Bytes
Contents
# frozen_string_literal: true class ThinkingSphinx::ActiveRecord::LogSubscriber < ActiveSupport::LogSubscriber def guard(event) identifier = color 'Sphinx', GREEN, true warn " #{identifier} #{event.payload[:guard]}" end def message(event) identifier = color 'Sphinx', GREEN, true debug " #{identifier} #{event.payload[:message]}" end def query(event) identifier = color('Sphinx Query (%.1fms)' % event.duration, GREEN, true) debug " #{identifier} #{event.payload[:query]}" end def caution(event) identifier = color 'Sphinx', GREEN, true warn " #{identifier} #{event.payload[:caution]}" end end ThinkingSphinx::ActiveRecord::LogSubscriber.attach_to :thinking_sphinx
Version data entries
16 entries across 16 versions & 1 rubygems