lib/sensu/api/http_handler.rb
# Log the HTTP response. This method calculates the
# request/response time. The debug log level is used for the
# response body log event, as it is generally very verbose and
# unnecessary in most cases.
Log the HTTP response. This method calculates the
request/response time. The debug log level is used for the
response body log event, as it is generally very verbose and
unnecessary in most cases.
Log the HTTP response . This method calculates the request / response time . The debug log level is used for the response body log event as it is generally very verbose and unnecessary in most cases .
def log_response
        @logger.info("api response", {
          :request => request_details,
          :status => @response.status,
          :content_length => @response.content.to_s.bytesize,
          :time => (Time.now.to_f - @request_start_time).round(3)
        })
      end
def log_response @logger . info ( "api response" , { :request => request_details , :status => @response . status , :content_length => @response . content . to_s . bytesize , :time => ( Time . now . to_f - @request_start_time ) . round ( 3 ) } ) end
Log the HTTP response.
Log the HTTP response .