]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librgw: cleanup, move 3 prints to log channel
authorMatt Benjamin <mbenjamin@redhat.com>
Thu, 14 Jan 2016 17:42:08 +0000 (12:42 -0500)
committerMatt Benjamin <mbenjamin@redhat.com>
Fri, 12 Feb 2016 17:08:01 +0000 (12:08 -0500)
Save a pointer to CephContext in RGWProcess for use by logger--
using the existing pointer in ThreadPool would be an intrusive
change.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/librgw.cc
src/rgw/rgw_file.h
src/rgw/rgw_process.h

index 84db604d83fb70e32cef7a31c49bc668475441c0..93a357868085972b5c69276a2baa194ebfd957b5 100644 (file)
@@ -81,7 +81,7 @@ namespace rgw {
   void RGWLibProcess::run()
   {
     while (! shutdown) {
-      std::cout << "RGWLibProcess GC" << std::endl;
+      lsubdout(cct, rgw, 5) << "RGWLibProcess GC" << dendl;
       unique_lock uniq(mtx);
     restart:
       int cur_gen = gen;
index da4379aa8c14f5db364ad3fa74465db307fe7e69..db928fbb84920e0474a7d3057bf9bf05d9868931 100644 (file)
@@ -887,9 +887,9 @@ public:
   }
 
   bool eof() {
-    std::cout << "READDIR offset: " << *offset
-             << " is_truncated: " << is_truncated
-             << std::endl;
+    lsubdout(cct, rgw, 15) << "READDIR offset: " << *offset
+                          << " is_truncated: " << is_truncated
+                          << dendl;
     return !is_truncated;
   }
 
@@ -921,8 +921,6 @@ public:
        marker.name += "/";
       marker.name += sm;
     }
-    std::cout << __func__ << " offset: " << *offset
-             <<  " marker: " << marker << std::endl;
     default_max = 1000; // XXX was being omitted
     magic = 72;
     op = this;
@@ -1055,10 +1053,10 @@ public:
   }
 
   bool eof() {
-    std::cout << "READDIR offset: " << *offset
-             << " next marker: " << next_marker
-             << " is_truncated: " << is_truncated
-             << std::endl;
+    lsubdout(cct, rgw, 15) << "READDIR offset: " << *offset
+                          << " next marker: " << next_marker
+                          << " is_truncated: " << is_truncated
+                          << dendl;
     return !is_truncated;
   }
 
index 324c7dc3262ddf1798ae18b25d741fc53082a478..33bad85da908b64d6f607c71ddf3f9c6615e4c31 100644 (file)
@@ -35,6 +35,7 @@ class RGWFrontendConfig;
 class RGWProcess {
   deque<RGWRequest*> m_req_queue;
 protected:
+  CephContext *cct;
   RGWRados* store;
   OpsLogSocket* olog;
   ThreadPool m_tp;
@@ -94,13 +95,11 @@ protected:
 
 public:
   RGWProcess(CephContext* cct, RGWProcessEnv* pe, int num_threads,
-            RGWFrontendConfig* _conf)
-    : store(pe->store), olog(pe->olog),
+           RGWFrontendConfig* _conf)
+    : cct(cct), store(pe->store), olog(pe->olog),
       m_tp(cct, "RGWProcess::m_tp", "tp_rgw_process", num_threads),
       req_throttle(cct, "rgw_ops", num_threads * 2),
-      rest(pe->rest),
-      conf(_conf),
-      sock_fd(-1),
+      rest(pe->rest), conf(_conf), sock_fd(-1),
       req_wq(this, g_conf->rgw_op_thread_timeout,
             g_conf->rgw_op_thread_suicide_timeout, &m_tp) {}