From: Casey Bodley Date: Thu, 13 Jan 2022 20:56:11 +0000 (-0500) Subject: rgw/dbstore: hide dbstore_log.h from rgw_main.cc X-Git-Tag: v17.1.0~38^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cf0a1e3ffeb641537c24df9f2f466d217b2008eb;p=ceph.git rgw/dbstore: hide dbstore_log.h from rgw_main.cc dbstore_log.h sets global dout_subsys/dout_prefix macros, and was leaking into rgw_main.cc through the common/dbstore.h. this caused all of rgw_main's log output to start with the wrong prefix "rgw dbstore: " Fixes: https://tracker.ceph.com/issues/53177 Signed-off-by: Casey Bodley (cherry picked from commit e956537ab85e0f9cf27f83742f204a26f2faca66) --- diff --git a/src/rgw/store/dbstore/common/dbstore.cc b/src/rgw/store/dbstore/common/dbstore.cc index a3d82f48559a..e47c600ee950 100644 --- a/src/rgw/store/dbstore/common/dbstore.cc +++ b/src/rgw/store/dbstore/common/dbstore.cc @@ -24,7 +24,7 @@ int DB::Initialize(string logfile, int loglevel) } if (loglevel > 0) { - cct->_conf->subsys.set_log_level(dout_subsys, loglevel); + cct->_conf->subsys.set_log_level(ceph_subsys_rgw, loglevel); } if (!logfile.empty()) { cct->_log->set_log_file(logfile); diff --git a/src/rgw/store/dbstore/common/dbstore.h b/src/rgw/store/dbstore/common/dbstore.h index dd4f2468931d..9bb61dca7a97 100644 --- a/src/rgw/store/dbstore/common/dbstore.h +++ b/src/rgw/store/dbstore/common/dbstore.h @@ -15,7 +15,6 @@ #define FMT_HEADER_ONLY 1 #include "fmt/format.h" #include -#include "dbstore_log.h" #include "rgw/rgw_sal.h" #include "rgw/rgw_common.h" #include "rgw/rgw_bucket.h" @@ -651,7 +650,7 @@ class DBOp { params->lc_entry_table.c_str(), params->bucket_table.c_str()); - ldout(params->cct, 0) << "Incorrect table type("<cct, rgw, 0) << "rgw dbstore: Incorrect table type("<get(); cct->_log->set_log_file(logfile); cct->_log->reopen_log_file(); - cct->_conf->subsys.set_log_level(dout_subsys, loglevel); + cct->_conf->subsys.set_log_level(ceph_subsys_rgw, loglevel); }; ~DBStoreManager() { destroyAllHandles(); };