Class: TwitterWithAutoPagination::ASLogSubscriber

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

Instance Method Summary collapse

Instance Method Details

#cache_any(event) ⇒ Object



65
66
67
68
69
70
71
72
# File 'lib/twitter_with_auto_pagination/log_subscriber.rb', line 65

def cache_any(event)
  return unless logger.debug?

  payload = event.payload
  name = "AS::#{payload[:name]} (#{event.duration.round(1)}ms)"
  name = color(name, MAGENTA, true)
  debug { "#{name} #{(payload.except(:name, :expires_in, :race_condition_ttl).inspect)}" }
end