Permalink
Browse files

Fixed response logging to use length instead of the entire thing (sea…

…ngeo) [#27 state:resolved]
  • Loading branch information...
1 parent 10ef65a commit 869d731cca89759f6dd7c141776b5d7358b59b9d David Heinemeier Hansson committed Apr 29, 2008
Showing with 3 additions and 1 deletion.
  1. +2 −0 activeresource/CHANGELOG
  2. +1 −1 activeresource/lib/active_resource/connection.rb
@@ -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]
@@ -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)

0 comments on commit 869d731

Please sign in to comment.