From 869d731cca89759f6dd7c141776b5d7358b59b9d Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 29 Apr 2008 17:16:36 -0500 Subject: Fixed response logging to use length instead of the entire thing (seangeo) [#27 state:resolved] --- activeresource/lib/active_resource/connection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activeresource/lib/active_resource/connection.rb') 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) -- cgit v1.2.3