From: Matt Benjamin Date: Thu, 14 Jan 2016 17:42:08 +0000 (-0500) Subject: librgw: cleanup, move 3 prints to log channel X-Git-Tag: v10.1.0~382^2~33 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e68600bef5dca8fac7b6796fcaaff3d6fac4c234;p=ceph.git librgw: cleanup, move 3 prints to log channel 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 --- diff --git a/src/rgw/librgw.cc b/src/rgw/librgw.cc index 84db604d83fb..93a357868085 100644 --- a/src/rgw/librgw.cc +++ b/src/rgw/librgw.cc @@ -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; diff --git a/src/rgw/rgw_file.h b/src/rgw/rgw_file.h index da4379aa8c14..db928fbb8492 100644 --- a/src/rgw/rgw_file.h +++ b/src/rgw/rgw_file.h @@ -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; } diff --git a/src/rgw/rgw_process.h b/src/rgw/rgw_process.h index 324c7dc3262d..33bad85da908 100644 --- a/src/rgw/rgw_process.h +++ b/src/rgw/rgw_process.h @@ -35,6 +35,7 @@ class RGWFrontendConfig; class RGWProcess { deque 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) {}