Sha256: 98c4ee9e78dffb20cb58094e5b36fb2f145aee5472267960eeb144caf72fb113
Contents?: true
Size: 1.23 KB
Versions: 96
Compression:
Stored size: 1.23 KB
Contents
module CassandraObject class LogSubscriber < ActiveSupport::LogSubscriber def multi_get(event) name = '%s multi_get (%.1fms)' % [event.payload[:column_family], event.duration] debug " #{name} (#{event.payload[:keys].size}) #{event.payload[:keys].join(" ")}" end def remove(event) name = '%s remove (%.1fms)' % [event.payload[:column_family], event.duration] message = " #{name} #{event.payload[:key]}" message << " #{Array(event.payload[:attributes]).inspect}" if event.payload[:attributes] debug message end def truncate(event) name = '%s truncate (%.1fms)' % [event.payload[:column_family], event.duration] debug " #{name} #{event.payload[:column_family]}" end def insert(event) name = '%s insert (%.1fms)' % [event.payload[:column_family], event.duration] debug " #{name} #{event.payload[:key]} #{event.payload[:attributes].inspect}" end def get_range(event) name = '%s get_range (%.1fms)' % [event.payload[:column_family], event.duration] debug " #{name} (#{event.payload[:count]}) '#{event.payload[:start]}' => '#{event.payload[:finish]}'" end end end CassandraObject::LogSubscriber.attach_to :cassandra_object
Version data entries
96 entries across 96 versions & 2 rubygems