From cd6a5b9c40779956629803f222c365bdb291a169 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 22 Mar 2019 10:58:30 -0500 Subject: [PATCH] log,global: do not start flusher thread until after we have our mon config We want to respect the settings in the mon config that affect logging before we enable the flusher thread. That allows us to set (via the monitor) things like log_to_file=false or log_to_syslog=true. Signed-off-by: Sage Weil --- src/common/ceph_context.cc | 1 - src/global/global_init.cc | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/common/ceph_context.cc b/src/common/ceph_context.cc index 8ea3e223629..3d70344d212 100644 --- a/src/common/ceph_context.cc +++ b/src/common/ceph_context.cc @@ -635,7 +635,6 @@ CephContext::CephContext(uint32_t module_type_, crush_location(this) { _log = new ceph::logging::Log(&_conf->subsys); - _log->start(); _log_obs = new LogObs(_log); _conf.add_observer(_log_obs); diff --git a/src/global/global_init.cc b/src/global/global_init.cc index 399a1f6541f..abce4c05529 100644 --- a/src/global/global_init.cc +++ b/src/global/global_init.cc @@ -154,7 +154,7 @@ void global_pre_init( _exit(1); } } - + cct->_log->start(); // do the --show-config[-val], if present in argv conf.do_argv_commands(); -- 2.39.5