summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-04-17 20:11:33 -0700
committerSage Weil <sage@inktank.com>2013-04-19 12:03:43 -0700
commitbe4807f5b88115bc5a553ecee6f42c0c7d7cfbe2 (patch)
tree19ad3e00241ff3ef34eff9361dbd5ccb383cfc6b
parentaf5a9b37f26e438b828adc44ef9642be6817379d (diff)
downloadceph-be4807f5b88115bc5a553ecee6f42c0c7d7cfbe2.tar.gz
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 <sage@inktank.com>
-rw-r--r--src/global/global_init.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/global/global_init.cc b/src/global/global_init.cc
index 0f7179c39df..7cd9f27b64f 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();
}