From: Yehuda Sadeh Date: Mon, 16 Dec 2013 22:27:52 +0000 (-0800) Subject: rgw: add some debug output X-Git-Tag: v0.78~307^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d9a1ff38e5106d6d7c41d5a02360d1f0c03d0a68;p=ceph.git rgw: add some debug output Dump request environment when starting processing request. We used to do it before, but it was recently dropped as part of a cleanup. Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_client_io.cc b/src/rgw/rgw_client_io.cc index 41cd6b98b18a..193f44e96e00 100644 --- a/src/rgw/rgw_client_io.cc +++ b/src/rgw/rgw_client_io.cc @@ -5,6 +5,21 @@ #include "rgw_client_io.h" +#define dout_subsys ceph_subsys_rgw + +void RGWClientIO::init(CephContext *cct) { + init_env(cct); + + if (cct->_conf->subsys.should_gather(ceph_subsys_rgw, 20)) { + std::map& env_map = env.get_map(); + std::map::iterator iter = env_map.begin(); + + for (iter = env_map.begin(); iter != env_map.end(); ++iter) { + ldout(cct, 20) << iter->first << "=" << iter->second << dendl; + } + } +} + int RGWClientIO::print(const char *format, ...) { diff --git a/src/rgw/rgw_client_io.h b/src/rgw/rgw_client_io.h index 64705fd20cbd..2e8720e502dd 100644 --- a/src/rgw/rgw_client_io.h +++ b/src/rgw/rgw_client_io.h @@ -25,10 +25,7 @@ public: virtual ~RGWClientIO() {} RGWClientIO() : account(false), bytes_sent(0), bytes_received(0) {} - void init(CephContext *cct) { - init_env(cct); - } - + void init(CephContext *cct); int print(const char *format, ...); int write(const char *buf, int len); virtual void flush() = 0;