From 452b1248a68f743ad55641722da80e3fd5ad2ae9 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Mon, 12 Mar 2012 13:18:39 -0700 Subject: [PATCH] rgw: provide different default values for 'debug rgw' Currently rgw and radosgw-admin require different chattiness defaults. Signed-off-by: Yehuda Sadeh --- src/common/config_opts.h | 2 +- src/rgw/rgw_main.cc | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common/config_opts.h b/src/common/config_opts.h index 7805223152541..b41db96713d5f 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -356,7 +356,7 @@ OPTION(bdev_iov_max, OPT_INT, 512) // max # iov's to collect into a s OPTION(bdev_debug_check_io_overlap, OPT_BOOL, true) // [DEBUG] check for any pending io overlaps OPTION(bdev_fake_mb, OPT_INT, 0) OPTION(bdev_fake_max_mb, OPT_INT, 0) -OPTION(debug_rgw, OPT_INT, 20) // log level for the Rados gateway +OPTION(debug_rgw, OPT_INT, 1) // log level for the Rados gateway OPTION(rgw_cache_enabled, OPT_BOOL, true) // rgw cache enabled OPTION(rgw_cache_lru_size, OPT_INT, 10000) // num of entries in rgw cache OPTION(rgw_socket_path, OPT_STR, "") // path to unix domain socket, if not specified, rgw will not run as external fcgi diff --git a/src/rgw/rgw_main.cc b/src/rgw/rgw_main.cc index 9729355bbead5..4d04b44bc44ab 100644 --- a/src/rgw/rgw_main.cc +++ b/src/rgw/rgw_main.cc @@ -337,10 +337,14 @@ int main(int argc, const char **argv) return ENOSYS; } + /* alternative default for module */ + vector def_args; + def_args.push_back("--debug-rgw=20"); + vector args; argv_to_vec(argc, argv, args); env_to_vec(args); - global_init(NULL, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_DAEMON, + global_init(&def_args, args, CEPH_ENTITY_TYPE_CLIENT, CODE_ENVIRONMENT_DAEMON, CINIT_FLAG_UNPRIVILEGED_DAEMON_DEFAULTS); pid_t childpid = 0; -- 2.39.5