Sha256: a4452bd9a6d0ed959859ea4531ed9c62966b1dc706a6614d64fcad30188d81d9
Contents?: true
Size: 587 Bytes
Versions: 7
Compression:
Stored size: 587 Bytes
Contents
class RESTHome def request_with_instrumentation(method, path, options) ActiveSupport::Notifications.instrument("request.resthome", :client => self.class.name, method: method, path: path) do request_without_instrumentation(method, path, options) end end alias_method_chain :request, :instrumentation class LogSubscriber < ActiveSupport::LogSubscriber def request(event) info '%s (%.1fms) %s %s' % [event.payload[:client], event.duration, event.payload[:method].upcase, event.payload[:path]] end end end RESTHome::LogSubscriber.attach_to :resthome
Version data entries
7 entries across 7 versions & 1 rubygems