...and replace code references with conf->subsys.should_gather().
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
struct config_option config_optionsp[] = {
#define OPTION(name, type, def_val) \
{ STRINGIFY(name), type, offsetof(struct md_config_t, name) },
-#define SUBSYS(name, log, gather) \
- { "debug_" STRINGIFY(name), OPT_INT, offsetof(struct md_config_t, debug_##name) },
+#define SUBSYS(name, log, gather)
#define DEFAULT_SUBSYS(log, gather)
#include "common/config_opts.h"
#undef OPTION
md_config_t::md_config_t()
:
#define OPTION(name, type, def_val) name(def_val),
-#define SUBSYS(name, log, gather) debug_##name(log),
-#define DEFAULT_SUBSYS(log, gather) debug(log),
+#define SUBSYS(name, log, gather)
+#define DEFAULT_SUBSYS(log, gather)
#include "common/config_opts.h"
#undef OPTION
#undef SUBSYS
#define OPTION_OPT_U32(name) const uint32_t name;
#define OPTION_OPT_U64(name) const uint64_t name;
#define OPTION(name, ty, init) OPTION_##ty(name)
-#define SUBSYS(name, log, gather) OPTION_OPT_INT(debug_##name)
-#define DEFAULT_SUBSYS(log, gather) OPTION_OPT_INT(debug)
+#define SUBSYS(name, log, gather)
+#define DEFAULT_SUBSYS(log, gather)
#include "common/config_opts.h"
#undef OPTION_OPT_INT
#undef OPTION_OPT_LONGLONG
{
//dout(10) << "show_subtrees" << dendl;
- if (dbl > g_conf->debug && dbl > g_conf->debug_mds)
+ if (!g_conf->subsys.should_gather(ceph_subsys_mds, dbl))
return; // i won't print anything.
if (subtrees.empty()) {
void Migrator::audit()
{
- if (g_conf->debug_mds < 5) return; // hrm.
+ if (!g_conf->subsys.should_gather(ceph_subsys_mds, 5))
+ return; // hrm.
// import_state
show_importing();
ldout(cct, 0) << "ERROR: could not decode policy, caught buffer::error" << dendl;
return -EIO;
}
- if (cct->_conf->debug_rgw >= 15) {
+ if (cct->_conf->subsys.should_gather(ceph_subsys_rgw, 15)) {
RGWAccessControlPolicy_S3 *s3policy = static_cast<RGWAccessControlPolicy_S3 *>(policy);
ldout(cct, 15) << "Read AccessControlPolicy";
s3policy->to_xml(*_dout);
goto done;
}
- if (s->cct->_conf->debug_rgw >= 15) {
+ if (s->cct->_conf->subsys.should_gather(ceph_subsys_rgw, 15)) {
ldout(s->cct, 15) << "Old AccessControlPolicy";
policy->to_xml(*_dout);
*_dout << dendl;
if (ret < 0)
goto done;
- if (s->cct->_conf->debug_rgw >= 15) {
+ if (s->cct->_conf->subsys.should_gather(ceph_subsys_rgw, 15)) {
ldout(s->cct, 15) << "New AccessControlPolicy:";
new_policy.to_xml(*_dout);
*_dout << dendl;
{
s = _s;
- if (s->cct->_conf->debug_rgw >= 20) {
+ if (s->cct->_conf->subsys.should_gather(ceph_subsys_rgw, 20)) {
char *p;
for (int i=0; (p = fcgx->envp[i]); ++i) {
ldout(s->cct, 20) << p << dendl;
if (attrs) {
*attrs = astate->attrset;
- if (cct->_conf->debug_rgw >= 20) {
+ if (cct->_conf->subsys.should_gather(ceph_subsys_rgw, 20)) {
for (iter = attrs->begin(); iter != attrs->end(); ++iter) {
ldout(cct, 20) << "Read xattr: " << iter->first << dendl;
}