From 64186f995e8673afb29d6bfe9a44e52d2723a6f9 Mon Sep 17 00:00:00 2001 From: Colin Patrick McCabe Date: Wed, 2 Mar 2011 07:28:10 -0800 Subject: [PATCH] dout: Reopen dout after parsing all config opts Reopen the dout stream only after we parse all configuration options. Specifying --log-file on the command line now works as expected. Signed-off-by: Colin McCabe --- src/common/common_init.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/common/common_init.cc b/src/common/common_init.cc index eefa09d1601b2..bf284c0c6092a 100644 --- a/src/common/common_init.cc +++ b/src/common/common_init.cc @@ -141,6 +141,11 @@ void common_init(std::vector& args, const char *module_type, int fl if (force_fg_logging) set_foreground_logging(); + if (g_conf.daemonize) + cout << ceph_version_to_string() << std::endl; + + parse_config_options(args); + { // In the long term, it would be best to ensure that we read ceph.conf // before initializing dout(). For now, just force a reopen here with the @@ -149,10 +154,6 @@ void common_init(std::vector& args, const char *module_type, int fl _dout_open_log(); } - if (g_conf.daemonize) - cout << ceph_version_to_string() << std::endl; - - parse_config_options(args); install_standard_sighandlers(); #ifdef HAVE_LIBTCMALLOC -- 2.39.5