'Log a request.
:param req: swob.Request object for the request
:param status_int: integer code for the response status
:param bytes_received: bytes successfully read from the request body
:param bytes_sent: bytes yielded to the WSGI server
:param start_time: timestamp request started
:param end_time: timestamp request completed
:param resp_headers: dict of the response headers'

def log_request(self, req, status_int, bytes_received, bytes_sent, start_time, end_time, resp_headers=None):

    resp_headers = (resp_headers or {})
    req_path = get_valid_utf8_str(req.path)
    the_request = quote(unquote(req_path), QUOTE_SAFE)
    if req.query_string:
        the_request = ((the_request + '?') + req.query_string)
    logged_headers = None
    if self.log_hdrs:
        if self.log_hdrs_only:
            logged_headers = '\n'.join((('%s:    %s' % (k, v)) for (k, v) in req.headers.items() if (k in self.log_hdrs_only)))
        else:
            logged_headers = '\n'.join((('%s:    %s' % (k, v)) for (k, v) in req.headers.items()))
    method = self.method_from_req(req)
    end_gmtime_str = time.strftime('%d/%b/%Y/%H/%M/%S', time.gmtime(end_time))
    duration_time_str = ('%.4f' % (end_time - start_time))
    start_time_str = ('%.9f' % start_time)
    end_time_str = ('%.9f' % end_time)
    policy_index = get_policy_index(req.headers, resp_headers)
    self.access_logger.info('    '.join((quote((str(x) if x else '-'), QUOTE_SAFE) for x in (get_remote_client(req), req.remote_addr, end_gmtime_str, method, the_request, req.environ.get('SERVER_PROTOCOL'), status_int, req.referer, req.user_agent, self.obscure_sensitive(req.headers.get('x-auth-token')), bytes_received, bytes_sent, req.headers.get('etag', None), req.environ.get('swift.trans_id'), logged_headers, duration_time_str, req.environ.get('swift.source'), ','.join((req.environ.get('swift.log_info') or '')), start_time_str, end_time_str, policy_index))))
    metric_name = self.statsd_metric_name(req, status_int, method)
    metric_name_policy = self.statsd_metric_name_policy(req, status_int, method, policy_index)
    if metric_name:
        self.access_logger.timing((metric_name + '.timing'), ((end_time - start_time) * 1000))
        self.access_logger.update_stats((metric_name + '.xfer'), (bytes_received + bytes_sent))
    if metric_name_policy:
        self.access_logger.timing((metric_name_policy + '.timing'), ((end_time - start_time) * 1000))
        self.access_logger.update_stats((metric_name_policy + '.xfer'), (bytes_received + bytes_sent))
