Sha256: bc6f9cfd612e364b7902eb79b476c7a3259574be5343fe8c66dc50b45651d844
Contents?: true
Size: 515 Bytes
Versions: 62
Compression:
Stored size: 515 Bytes
Contents
module ActiveResource class DetailedLogSubscriber < ActiveSupport::LogSubscriber def request(event) data = event.payload[:data] headers = data.extract_options! request_body = data.first info "Request:\n#{request_body}" if request_body info "Headers: #{headers.inspect}" info "Response:\n#{event.payload[:response].body}" end def logger ActiveResource::Base.logger end end end ActiveResource::DetailedLogSubscriber.attach_to :active_resource_detailed
Version data entries
62 entries across 62 versions & 3 rubygems
Version | Path |
---|---|
shopify_api-2.3.0 | lib/active_resource/detailed_log_subscriber.rb |
shopify_api-2.2.0 | lib/active_resource/detailed_log_subscriber.rb |