Class: FlyingSphinx::Response::Logger

Inherits:
Faraday::Middleware
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/flying_sphinx/response/logger.rb

Instance Method Summary collapse

Instance Method Details

#call(environment) ⇒ Object


4
5
6
7
8
9
# File 'lib/flying_sphinx/response/logger.rb', line 4

def call(environment)
  debug "API Request: #{environment[:method]} #{environment[:url]}"
  debug "API Body:    #{environment[:body].inspect}"

  super
end

#on_complete(environment) ⇒ Object


11
12
13
14
# File 'lib/flying_sphinx/response/logger.rb', line 11

def on_complete(environment)
  debug "API Status:   #{environment[:status]}"
  debug "API Response: #{environment[:body].inspect}"
end