mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fixed problems with the logger used if the logging string included %'s [#840 state:resolved] (Jamis Buck)
This commit is contained in:
parent
8aad8cb390
commit
aad7cac6ad
2 changed files with 3 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
|||
*Edge*
|
||||
|
||||
* Fixed problems with the logger used if the logging string included %'s [#840 state:resolved] (Jamis Buck)
|
||||
|
||||
* Fixed Base#exists? to check status code as integer [#299 state:resolved] (Wes Oldenbeuving)
|
||||
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ module ActiveResource
|
|||
logger.info "#{method.to_s.upcase} #{site.scheme}://#{site.host}:#{site.port}#{path}" if logger
|
||||
result = nil
|
||||
time = Benchmark.realtime { result = http.send(method, path, *arguments) }
|
||||
logger.info "--> #{result.code} #{result.message} (#{result.body ? result.body.length : 0}b %.2fs)" % time if logger
|
||||
logger.info "--> %d %s (%d %.2fs)" % [result.code, result.message, result.body ? result.body.length : 0, time] if logger
|
||||
handle_response(result)
|
||||
rescue Timeout::Error => e
|
||||
raise TimeoutError.new(e.message)
|
||||
|
|
Loading…
Reference in a new issue