From e66072fa46bb851b0f67f424e7b8caa1463b3a06 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 3 Mar 2009 16:07:10 -0800 Subject: [PATCH] ceph_ver: write log message whenever a new log is opened --- src/common/common_init.cc | 7 ------- src/common/debug.cc | 6 ++++++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/common/common_init.cc b/src/common/common_init.cc index 0ec564bc4993a..d87ee8493d9fc 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 156a860c012f9..0e490f1c09446 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() -- 2.39.5