diff options
author | Thom May <thom@chef.io> | 2018-03-23 13:05:13 +0000 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-03-26 10:34:39 -0700 |
commit | 97c1dd6f1cac6d97e85d05039cad8b28596141ba (patch) | |
tree | d8a97c0f7016986a2cc264aa50ae345638ed026c /lib/chef/http.rb | |
parent | 1b81f35e023bcdc87e410c641545e849298de5c3 (diff) | |
download | chef-97c1dd6f1cac6d97e85d05039cad8b28596141ba.tar.gz |
mechanical conversion of most debug log statements to trace
Signed-off-by: Thom May <thom@chef.io>
Diffstat (limited to 'lib/chef/http.rb')
-rw-r--r-- | lib/chef/http.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/chef/http.rb b/lib/chef/http.rb index 241806da4e..edcd6eed3d 100644 --- a/lib/chef/http.rb +++ b/lib/chef/http.rb @@ -54,7 +54,7 @@ class Chef # stream handlers handle responses so must be applied in reverse order # (same as #apply_stream_complete_middleware or #apply_response_midddleware) @stream_handlers.reverse.inject(next_chunk) do |chunk, handler| - Chef::Log.debug("Chef::HTTP::StreamHandler calling #{handler.class}#handle_chunk") + Chef::Log.trace("Chef::HTTP::StreamHandler calling #{handler.class}#handle_chunk") handler.handle_chunk(chunk) end end @@ -156,7 +156,7 @@ class Chef http_attempts += 1 response = e.response if response.kind_of?(Net::HTTPNotAcceptable) && version_retries - http_attempts > 0 - Chef::Log.debug("Negotiating protocol version with #{url}, retry #{http_attempts}/#{version_retries}") + Chef::Log.trace("Negotiating protocol version with #{url}, retry #{http_attempts}/#{version_retries}") retry else raise @@ -194,7 +194,7 @@ class Chef http_attempts += 1 response = e.response if response.kind_of?(Net::HTTPNotAcceptable) && version_retries - http_attempts > 0 - Chef::Log.debug("Negotiating protocol version with #{url}, retry #{http_attempts}/#{version_retries}") + Chef::Log.trace("Negotiating protocol version with #{url}, retry #{http_attempts}/#{version_retries}") retry else raise @@ -249,7 +249,7 @@ class Chef http_attempts += 1 response = e.response if response.kind_of?(Net::HTTPNotAcceptable) && version_retries - http_attempts > 0 - Chef::Log.debug("Negotiating protocol version with #{url}, retry #{http_attempts}/#{version_retries}") + Chef::Log.trace("Negotiating protocol version with #{url}, retry #{http_attempts}/#{version_retries}") retry else raise @@ -324,7 +324,7 @@ class Chef # @api private def apply_request_middleware(method, url, headers, data) middlewares.inject([method, url, headers, data]) do |req_data, middleware| - Chef::Log.debug("Chef::HTTP calling #{middleware.class}#handle_request") + Chef::Log.trace("Chef::HTTP calling #{middleware.class}#handle_request") middleware.handle_request(*req_data) end end @@ -332,7 +332,7 @@ class Chef # @api private def apply_response_middleware(response, rest_request, return_value) middlewares.reverse.inject([response, rest_request, return_value]) do |res_data, middleware| - Chef::Log.debug("Chef::HTTP calling #{middleware.class}#handle_response") + Chef::Log.trace("Chef::HTTP calling #{middleware.class}#handle_response") middleware.handle_response(*res_data) end end @@ -340,7 +340,7 @@ class Chef # @api private def apply_stream_complete_middleware(response, rest_request, return_value) middlewares.reverse.inject([response, rest_request, return_value]) do |res_data, middleware| - Chef::Log.debug("Chef::HTTP calling #{middleware.class}#handle_stream_complete") + Chef::Log.trace("Chef::HTTP calling #{middleware.class}#handle_stream_complete") middleware.handle_stream_complete(*res_data) end end @@ -468,7 +468,7 @@ class Chef def follow_redirect raise Chef::Exceptions::RedirectLimitExceeded if @redirects_followed >= redirect_limit @redirects_followed += 1 - Chef::Log.debug("Following redirect #{@redirects_followed}/#{redirect_limit}") + Chef::Log.trace("Following redirect #{@redirects_followed}/#{redirect_limit}") yield ensure @@ -506,7 +506,7 @@ class Chef tf.binmode # required for binary files on Windows platforms end end - Chef::Log.debug("Streaming download from #{url} to tempfile #{tf.path}") + Chef::Log.trace("Streaming download from #{url} to tempfile #{tf.path}") # Stolen from http://www.ruby-forum.com/topic/166423 # Kudos to _why! |