From: Sage Weil Date: Thu, 18 Apr 2013 03:11:33 +0000 (-0700) Subject: global: call observers (and start logging) in global_init X-Git-Tag: v0.61~142 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=be4807f5b88115bc5a553ecee6f42c0c7d7cfbe2;p=ceph.git global: call observers (and start logging) in global_init Call observers so that the logging infrastructure gets initailized and we start logging. Otherwise, unless a default log setting has been modified, we won't start logging until we daemonize, and we won't get the nice version banner in the log file. Unlike the previous attempt to fix this (a3091774), we do this after all of the lockdep initialization has completed. Signed-off-by: Sage Weil --- diff --git a/src/global/global_init.cc b/src/global/global_init.cc index 0f7179c39dfd..7cd9f27b64f0 100644 --- a/src/global/global_init.cc +++ b/src/global/global_init.cc @@ -125,6 +125,10 @@ void global_init(std::vector < const char * > *alt_def_args, std::vector < const } register_assert_context(cct); + // call all observers now. this has the side-effect of configuring + // and opening the log file immediately. + conf->call_all_observers(); + if (code_env == CODE_ENVIRONMENT_DAEMON) output_ceph_version(); }