From a70232e830a958bfe7eb5b2ff4244bc69e1ddd7d Mon Sep 17 00:00:00 2001 From: Yanhu Cao Date: Fri, 30 Jun 2017 16:44:01 +0800 Subject: [PATCH] mon/MonmapMonitor: use __func__ instead of hard code function name Signed-off-by: Yanhu Cao --- src/mon/MonmapMonitor.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mon/MonmapMonitor.cc b/src/mon/MonmapMonitor.cc index 5035e1e23ce34..a402ae1525a04 100644 --- a/src/mon/MonmapMonitor.cc +++ b/src/mon/MonmapMonitor.cc @@ -37,7 +37,7 @@ static ostream& _prefix(std::ostream *_dout, Monitor *mon) { void MonmapMonitor::create_initial() { - dout(10) << "create_initial using current monmap" << dendl; + dout(10) << __func__ << " using current monmap" << dendl; pending_map = *mon->monmap; pending_map.epoch = 1; @@ -70,7 +70,7 @@ void MonmapMonitor::update_from_paxos(bool *need_bootstrap) assert(ret == 0); assert(monmap_bl.length()); - dout(10) << "update_from_paxos got " << version << dendl; + dout(10) << __func__ << " got " << version << dendl; mon->monmap->decode(monmap_bl); if (mon->store->exists("mkfs", "monmap")) { @@ -87,12 +87,12 @@ void MonmapMonitor::create_pending() pending_map = *mon->monmap; pending_map.epoch++; pending_map.last_changed = ceph_clock_now(); - dout(10) << "create_pending monmap epoch " << pending_map.epoch << dendl; + dout(10) << __func__ << " monmap epoch " << pending_map.epoch << dendl; } void MonmapMonitor::encode_pending(MonitorDBStore::TransactionRef t) { - dout(10) << "encode_pending epoch " << pending_map.epoch << dendl; + dout(10) << __func__ << " epoch " << pending_map.epoch << dendl; assert(mon->monmap->epoch + 1 == pending_map.epoch || pending_map.epoch == 1); // special case mkfs! @@ -397,7 +397,7 @@ reply: bool MonmapMonitor::prepare_update(MonOpRequestRef op) { PaxosServiceMessage *m = static_cast(op->get_req()); - dout(7) << "prepare_update " << *m << " from " << m->get_orig_source_inst() << dendl; + dout(7) << __func__ << " " << *m << " from " << m->get_orig_source_inst() << dendl; switch (m->get_type()) { case MSG_MON_COMMAND: @@ -688,7 +688,7 @@ reply: bool MonmapMonitor::preprocess_join(MonOpRequestRef op) { MMonJoin *join = static_cast(op->get_req()); - dout(10) << "preprocess_join " << join->name << " at " << join->addr << dendl; + dout(10) << __func__ << " " << join->name << " at " << join->addr << dendl; MonSession *session = join->get_session(); if (!session || -- 2.39.5