]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
log,global: do not start flusher thread until after we have our mon config 27278/head
authorSage Weil <sage@redhat.com>
Fri, 22 Mar 2019 15:58:30 +0000 (10:58 -0500)
committerSage Weil <sage@redhat.com>
Fri, 29 Mar 2019 23:19:23 +0000 (18:19 -0500)
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 <sage@redhat.com>
(cherry picked from commit cd6a5b9c40779956629803f222c365bdb291a169)

src/common/ceph_context.cc
src/global/global_init.cc

index 8ea3e22362994ac94f5c1d97e34caea1deee90f2..3d70344d212ca0759acefef17254158c92ba7bab 100644 (file)
@@ -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);
index 399a1f6541f877d4d1b9171bae50db09feda0d2b..abce4c05529b8801c6daae1e00268dab2e1c0207 100644 (file)
@@ -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();