def do_logging(action, request, response)
      logger = get_logger()
      return unless should_log_summary(logger.level, response.soap_fault?)

      response_hash = response.hash

      soap_headers = {}
      begin
        soap_headers = response_hash[:envelope][:header][:response_header]
      rescue NoMethodError
        # If there are no headers, just ignore. We'll log what we know.
      end

      summary_message = ('ID: %s, URL: %s, Service: %s, Action: %s, Response ' +
          'time: %sms, Request ID: %s') % [@header_handler.identifier,
          request.url, self.class.to_s.split("::").last, action,
          soap_headers[:response_time], soap_headers[:request_id]]
      if soap_headers[:operations]
        summary_message += ', Operations: %s' % soap_headers[:operations]
      end
      summary_message += ', Is fault: %s' % response.soap_fault?

      request_message = nil
      response_message = nil

      if should_log_payloads(logger.level, response.soap_fault?)
        request_message = 'Outgoing request: %s %s' %
            [format_headers(request.headers), sanitize_request(request.body)]
        response_message = 'Incoming response: %s %s' %
            [format_headers(response.http.headers), response.http.body]
      end

      if response.soap_fault?
        summary_message += ', Fault message: %s' % format_fault(
            response_hash[:envelope][:body][:fault][:faultstring])
        logger.warn(summary_message)
        logger.info(request_message) unless request_message.nil?
        logger.info(response_message) unless response_message.nil?
      else
        logger.info(summary_message)
        logger.debug(request_message) unless request_message.nil?
        logger.debug(response_message) unless response_message.nil?
      end
    end
def do_logging(action, request, response)
      logger = get_logger()
      return unless should_log_summary(logger.level, response.soap_fault?)

      response_hash = response.hash

      soap_headers = {}
      begin
        soap_headers = response_hash[:envelope][:header][:response_header]
      rescue NoMethodError
        # If there are no headers, just ignore. We'll log what we know.
      end

      summary_message = ('ID: %s, URL: %s, Service: %s, Action: %s, Response ' +
          'time: %sms, Request ID: %s') % [@header_handler.identifier,
          request.url, self.class.to_s.split("::").last, action,
          soap_headers[:response_time], soap_headers[:request_id]]
      if soap_headers[:operations]
        summary_message += ', Operations: %s' % soap_headers[:operations]
      end
      summary_message += ', Is fault: %s' % response.soap_fault?

      request_message = nil
      response_message = nil

      if should_log_payloads(logger.level, response.soap_fault?)
        request_message = 'Outgoing request: %s %s' %
            [format_headers(request.headers), sanitize_request(request.body)]
        response_message = 'Incoming response: %s %s' %
            [format_headers(response.http.headers), response.http.body]
      end

      if response.soap_fault?
        summary_message += ', Fault message: %s' % format_fault(
            response_hash[:envelope][:body][:fault][:faultstring])
        logger.warn(summary_message)
        logger.info(request_message) unless request_message.nil?
        logger.info(response_message) unless response_message.nil?
      else
        logger.info(summary_message)
        logger.debug(request_message) unless request_message.nil?
        logger.debug(response_message) unless response_message.nil?
      end
    end
Log the request, response, and summary lines.