]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: add some debug output
authorYehuda Sadeh <yehuda@inktank.com>
Mon, 16 Dec 2013 22:27:52 +0000 (14:27 -0800)
committerYehuda Sadeh <yehuda@inktank.com>
Fri, 20 Dec 2013 21:50:39 +0000 (13:50 -0800)
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 <yehuda@inktank.com>
src/rgw/rgw_client_io.cc
src/rgw/rgw_client_io.h

index 41cd6b98b18aed101269ea15216a89040f9e2eec..193f44e96e001c43aa5e67eeda8deb2b19cafdbe 100644 (file)
@@ -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<string, string, ltstr_nocase>& env_map = env.get_map();
+    std::map<string, string, ltstr_nocase>::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, ...)
 {
index 64705fd20cbda29bddd305cf5ca032632ffd42dd..2e8720e502ddbc39fcf083edfd462665ccd063ef 100644 (file)
@@ -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;