]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rgw/rgw_request.cc
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
5 #include "rgw_request.h"
7 #define dout_context g_ceph_context
8 #define dout_subsys ceph_subsys_rgw
11 void RGWRequest::log_format(struct req_state
*s
, const char *fmt
, ...)
13 #define LARGE_SIZE 1024
18 vsnprintf(buf
, sizeof(buf
), fmt
, ap
);
22 } /* RGWRequest::log_format */
24 void RGWRequest::log_init() {
25 ts
= ceph_clock_now();
28 void RGWRequest::log(struct req_state
*s
, const char *msg
) {
29 if (s
->info
.method
&& req_str
.size() == 0) {
30 req_str
= s
->info
.method
;
32 req_str
.append(s
->info
.request_uri
);
34 utime_t t
= ceph_clock_now() - ts
;
35 dout(2) << "req " << id
<< ":" << t
<< ":" << s
->dialect
<< ":"
36 << req_str
<< ":" << (op
? op
->name() : "") << ":" << msg