From 7a50b3d0f33accacb6b8b4a3a28bc963fd0325c2 Mon Sep 17 00:00:00 2001 From: Roi Dayan <roid@mellanox.com> Date: Thu, 10 Mar 2016 11:20:27 +0200 Subject: [PATCH] xio: add prefix to xio msgr logs This will help identify the msgr instance. This is the same prefix style as the other msgrs. Change-Id: I47aeaf5e62c5c728691affb67858bd791ea20ba9 Signed-off-by: Roi Dayan <roid@mellanox.com> --- src/msg/xio/XioMessenger.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/msg/xio/XioMessenger.cc b/src/msg/xio/XioMessenger.cc index b3208678bb5..af086620775 100644 --- a/src/msg/xio/XioMessenger.cc +++ b/src/msg/xio/XioMessenger.cc @@ -249,6 +249,12 @@ static string xio_uri_from_entity(const string &type, } /* xio_uri_from_entity */ /* XioMessenger */ +#undef dout_prefix +#define dout_prefix _prefix(_dout, this) +static ostream& _prefix(std::ostream *_dout, XioMessenger *msgr) { + return *_dout << "-- " << msgr->get_myaddr() << " "; +} + XioMessenger::XioMessenger(CephContext *cct, entity_name_t name, string mname, uint64_t _nonce, uint64_t features, DispatchStrategy *ds)