]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_ver: write log message whenever a new log is opened
authorYehuda Sadeh <yehuda@hq.newdream.net>
Wed, 4 Mar 2009 00:07:10 +0000 (16:07 -0800)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Wed, 4 Mar 2009 00:07:10 +0000 (16:07 -0800)
src/common/common_init.cc
src/common/debug.cc

index 0ec564bc4993ae4c11023b742311a966cc1dad45..d87ee8493d9fcc5448246b4deb2d14123f46d80f 100644 (file)
@@ -2,11 +2,6 @@
 #include "config.h"
 #include "tls.h"
 
-#include "ceph_ver.h"
-
-#define _STR(x) #x
-#define STRINGIFY(x) _STR(x)
-
 void common_init(std::vector<const char*>& args, bool open)
 {
   tls_init();
@@ -17,7 +12,5 @@ void common_init(std::vector<const char*>& args, bool open)
   // open log file?
  if (open)
     _dout_open_log();
-
-  generic_dout(0) << "ceph version " << VERSION << " (" << STRINGIFY(CEPH_GIT_VER) << ")" << dendl;
 }
 
index 156a860c012f9b69f7582f07803731aabc82242f..0e490f1c0944660fdd7c0f473e074633815262dc 100644 (file)
@@ -5,10 +5,15 @@
 #include "Mutex.h"
 #include "Clock.h"
 
+#include "ceph_ver.h"
+
 #include <fstream>
 #include <iostream>
 using namespace std;
 
+#define _STR(x) #x
+#define STRINGIFY(x) _STR(x)
+
 // debug output
 Mutex _dout_lock("_dout_lock", false, false /* no lockdep */);  
 ostream *_dout = &std::cout;
@@ -65,6 +70,7 @@ void _dout_open_log()
     _dout = out;
     *_dout << g_clock.now() << " --- opened log " << _dout_path << " ---" << std::endl;
   }
+  *_dout << "ceph version " << VERSION << " (" << STRINGIFY(CEPH_GIT_VER) << ")" << std::endl;
 }
 
 int _dout_rename_output_file()  // after calling daemon()