From: Samuel Just Date: Thu, 30 May 2019 19:04:41 +0000 (-0700) Subject: crimson/osd/main: add --debug option X-Git-Tag: v15.1.0~2580^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=909f4e260e0fd86064b0fbf810a39c416325663d;p=ceph-ci.git crimson/osd/main: add --debug option Really, what we need to do is examine the ceph conf and set the right logger levels based on configured log levels, but this'll suffice for now. Signed-off-by: Samuel Just --- diff --git a/src/crimson/osd/main.cc b/src/crimson/osd/main.cc index 90b871ed246..6fabf7f6cc3 100644 --- a/src/crimson/osd/main.cc +++ b/src/crimson/osd/main.cc @@ -71,7 +71,8 @@ int main(int argc, char* argv[]) { seastar::app_template app; app.add_options() - ("mkfs", "create a [new] data directory"); + ("mkfs", "create a [new] data directory") + ("debug", "enable debug output on all loggers"); auto [ceph_args, app_args] = partition_args(app, argv, argv + argc); if (ceph_argparse_need_usage(ceph_args)) { @@ -96,6 +97,11 @@ int main(int argc, char* argv[]) return app.run_deprecated(app_args.size(), const_cast(app_args.data()), [&] { auto& config = app.configuration(); return seastar::async([&] { + if (config.count("debug")) { + seastar::global_logger_registry().set_all_loggers_level( + seastar::log_level::debug + ); + } sharded_conf().start(init_params.name, cluster_name).get(); seastar::engine().at_exit([] { return sharded_conf().stop();