From 7a5ff308eb5f45dcd8f7a25f6915e78f3b9528a0 Mon Sep 17 00:00:00 2001 From: Leon Breedt Date: Fri, 25 Feb 2005 02:24:36 +0000 Subject: handle elapsed times that are nil in #log_response (happens when API method throws an exception). this fixes exception marshaling so that remote callers get a proper stack trace. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@798 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../lib/action_web_service/dispatcher/action_controller_dispatcher.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionwebservice/lib/action_web_service/dispatcher') diff --git a/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb b/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb index a8f34f2e33..511d00ca44 100644 --- a/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb +++ b/actionwebservice/lib/action_web_service/dispatcher/action_controller_dispatcher.rb @@ -95,7 +95,7 @@ module ActionWebService # :nodoc: def log_response(response, elapsed) unless logger.nil? || response.nil? - logger.debug("\nWeb Service Response (%f):" % elapsed) + logger.debug("\nWeb Service Response" + (elapsed ? " (%f):" % elapsed : ":")) indented = response.raw_body.split(/\n/).map{|x| " #{x}"}.join("\n") logger.debug(indented) end -- cgit v1.2.3