Skip to content

Commit

Permalink
Fixed response logging to use length instead of the entire thing (sea…
Browse files Browse the repository at this point in the history
…ngeo) [#27 state:resolved]
  • Loading branch information
David Heinemeier Hansson committed Apr 29, 2008
1 parent 10ef65a commit 869d731
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions activeresource/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
*SVN*

* Fixed response logging to use length instead of the entire thing (seangeo) [#27]

* Fixed that to_param should be used and honored instead of hardcoding the id #11406 [gspiers]

* Improve documentation. [Radar, Jan De Poorter, chuyeow, xaviershay, danger, miloops, Xavier Noria, Sunny Ripert]
Expand Down
2 changes: 1 addition & 1 deletion activeresource/lib/active_resource/connection.rb
Original file line number Diff line number Diff line change
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 : 0}b %.2fs)" % time if logger
logger.info "--> #{result.code} #{result.message} (#{result.body ? result.body.length : 0}b %.2fs)" % time if logger
handle_response(result)
rescue Timeout::Error => e
raise TimeoutError.new(e.message)
Expand Down

0 comments on commit 869d731

Please sign in to comment.