From: Yehuda Sadeh Date: Wed, 4 Mar 2009 00:07:10 +0000 (-0800) Subject: ceph_ver: write log message whenever a new log is opened X-Git-Tag: v0.7~49 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e66072fa46bb851b0f67f424e7b8caa1463b3a06;p=ceph.git ceph_ver: write log message whenever a new log is opened --- diff --git a/src/common/common_init.cc b/src/common/common_init.cc index 0ec564bc4993..d87ee8493d9f 100644 --- a/src/common/common_init.cc +++ b/src/common/common_init.cc @@ -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& args, bool open) { tls_init(); @@ -17,7 +12,5 @@ void common_init(std::vector& args, bool open) // open log file? if (open) _dout_open_log(); - - generic_dout(0) << "ceph version " << VERSION << " (" << STRINGIFY(CEPH_GIT_VER) << ")" << dendl; } diff --git a/src/common/debug.cc b/src/common/debug.cc index 156a860c012f..0e490f1c0944 100644 --- a/src/common/debug.cc +++ b/src/common/debug.cc @@ -5,10 +5,15 @@ #include "Mutex.h" #include "Clock.h" +#include "ceph_ver.h" + #include #include 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()