Class: Cacheflow::Memcached::Instrumenter

Inherits:
ActiveSupport::LogSubscriber
  • Object
show all
Defined in:
lib/cacheflow/memcached.rb

Instance Method Summary collapse

Instance Method Details

#query(event) ⇒ Object



16
17
18
19
20
21
# File 'lib/cacheflow/memcached.rb', line 16

def query(event)
  return if !logger.debug? || Cacheflow.silenced?

  name = "%s (%.2fms)" % ["Memcached", event.duration]
  debug "  #{color(name, BLUE, bold: true)} #{event.payload[:op].to_s.upcase} #{Cacheflow.args(event.payload[:args])}"
end