Track whether a message is a broadcast. If a broadcast, log at a lower level.

This commit is contained in:
JoelKatz
2013-02-12 22:05:46 -08:00
parent 1cf14d68be
commit 73fe72bfa3
7 changed files with 20 additions and 20 deletions

View File

@@ -85,7 +85,7 @@ void RPCSub::sendThread()
} while (bSend);
}
void RPCSub::send(const Json::Value& jvObj)
void RPCSub::send(const Json::Value& jvObj, bool broadcast)
{
boost::mutex::scoped_lock sl(mLockInfo);
@@ -96,7 +96,7 @@ void RPCSub::send(const Json::Value& jvObj)
mDeque.pop_back();
}
cLog(lsINFO) << boost::str(boost::format("callRPC push: %s") % jvObj);
cLog(broadcast ? lsDEBUG : lsINFO) << boost::str(boost::format("callRPC push: %s") % jvObj);
mDeque.push_back(std::make_pair(mSeq++, jvObj));