Skip to content

Commit

Permalink
Fixed problems with the logger used if the logging string included %'s [
Browse files Browse the repository at this point in the history
#840 state:resolved] (Jamis Buck)
  • Loading branch information
dhh committed Aug 15, 2008
1 parent 8aad8cb commit aad7cac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions activeresource/CHANGELOG
@@ -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)


Expand Down
2 changes: 1 addition & 1 deletion activeresource/lib/active_resource/connection.rb
Expand Up @@ -140,7 +140,7 @@ def request(method, path, *arguments)
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)
Expand Down

0 comments on commit aad7cac

Please sign in to comment.