]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
global: call observers (and start logging) in global_init
authorSage Weil <sage@inktank.com>
Thu, 18 Apr 2013 03:11:33 +0000 (20:11 -0700)
committerSage Weil <sage@inktank.com>
Fri, 19 Apr 2013 19:03:43 +0000 (12:03 -0700)
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>
src/global/global_init.cc

index 0f7179c39dfda360340697e3570b73ccfe5f3fa5..7cd9f27b64f0761af6c89e210978badd999f977e 100644 (file)
@@ -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();
 }