More logging for RPC subscribe.

This commit is contained in:
Arthur Britto
2013-01-14 21:21:22 -08:00
parent 758ba0b3e3
commit 9c6d073d89

View File

@@ -55,9 +55,11 @@ void RPCSub::sendThread()
// Send outside of the lock.
if (bSend)
{
// Drop result.
try
{
cLog(lsDEBUG) << boost::str(boost::format("callRPC calling: %s") % mIp);
// Drop result.
(void) callRPC(mIp, mPort, mUsername, mPassword, mPath, "event", jvEvent);
}
catch (const std::exception& e)
@@ -76,9 +78,12 @@ void RPCSub::send(const Json::Value& jvObj)
{
// Drop the previous event.
cLog(lsDEBUG) << boost::str(boost::format("callRPC drop"));
mDeque.pop_back();
}
cLog(lsDEBUG) << boost::str(boost::format("callRPC push: %s") % jvObj);
mDeque.push_back(std::make_pair(mSeq++, jvObj));
if (!mSending)
@@ -86,6 +91,7 @@ void RPCSub::send(const Json::Value& jvObj)
// Start a sending thread.
mSending = true;
cLog(lsDEBUG) << boost::str(boost::format("callRPC start");
boost::thread(boost::bind(&RPCSub::sendThread, this)).detach();
}
}