mon/MgrMonitor: make debug prefix useful

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-04-05 11:58:57 -04:00
parent f2a44f4160
commit 2faa01bf86

View File

@ -25,7 +25,13 @@
#define dout_subsys ceph_subsys_mon
#undef dout_prefix
#define dout_prefix *_dout << "MgrMonitor " << __func__ << " "
#define dout_prefix _prefix(_dout, mon, map)
static ostream& _prefix(std::ostream *_dout, Monitor *mon,
const MgrMap& mgrmap) {
return *_dout << "mon." << mon->name << "@" << mon->rank
<< "(" << mon->get_state_name()
<< ").mgr e" << mgrmap.get_epoch() << " ";
}
void MgrMonitor::create_initial()
{