7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/binnacle/http_logging/adapters/patron.rb', line 7
def request(action_name, url, , options = {})
log_enabled = Binnacle::HttpLogger.allow?(url)
bm = Benchmark.realtime do
@response = orig_request(action_name, url, , options)
end
if log_enabled
= @response.
uri = URI(url)
url_without_query = "#{uri.scheme}://#{uri.host}:#{uri.port}#{uri.path}"
Binnacle::HttpLogger.signal(url_without_query, action_name, uri.host, uri.port, uri.path, uri.query, @response.status, bm, , @response.body, ['Content-Encoding'], ['Content-Type'], options[:data])
end
end
|