diff options
author | David Heinemeier Hansson <david@envy8-2.local> | 2008-04-29 17:16:36 -0500 |
---|---|---|
committer | David Heinemeier Hansson <david@envy8-2.local> | 2008-04-29 17:16:36 -0500 |
commit | 869d731cca89759f6dd7c141776b5d7358b59b9d (patch) | |
tree | 8e2c89338265b7b108fbfef7baf8ecd104be2728 | |
parent | 10ef65a3b054270ed3d458ec8eb7c2b9a3e638f7 (diff) | |
download | rails-869d731cca89759f6dd7c141776b5d7358b59b9d.tar.gz rails-869d731cca89759f6dd7c141776b5d7358b59b9d.tar.bz2 rails-869d731cca89759f6dd7c141776b5d7358b59b9d.zip |
Fixed response logging to use length instead of the entire thing (seangeo) [#27 state:resolved]
-rw-r--r-- | activeresource/CHANGELOG | 2 | ||||
-rw-r--r-- | activeresource/lib/active_resource/connection.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/activeresource/CHANGELOG b/activeresource/CHANGELOG index 6048a6aafc..7becf4fc0c 100644 --- a/activeresource/CHANGELOG +++ b/activeresource/CHANGELOG @@ -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] diff --git a/activeresource/lib/active_resource/connection.rb b/activeresource/lib/active_resource/connection.rb index 98b3f87167..46e3d1f4e3 100644 --- a/activeresource/lib/active_resource/connection.rb +++ b/activeresource/lib/active_resource/connection.rb @@ -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 : 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) |