Skip to content

Commit ffacd27

Browse files
committed
zmq: prepend zmq to debug messages
1 parent 14075b1 commit ffacd27

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/zmq/zmqnotificationinterface.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
void zmqError(const char *str)
1414
{
15-
LogPrint("zmq", "Error: %s, errno=%s\n", str, zmq_strerror(errno));
15+
LogPrint("zmq", "zmq: Error: %s, errno=%s\n", str, zmq_strerror(errno));
1616
}
1717

1818
CZMQNotificationInterface::CZMQNotificationInterface() : pcontext(NULL)
@@ -72,7 +72,7 @@ CZMQNotificationInterface* CZMQNotificationInterface::CreateWithArguments(const
7272
// Called at startup to conditionally set up ZMQ socket(s)
7373
bool CZMQNotificationInterface::Initialize()
7474
{
75-
LogPrint("zmq", "Initialize notification interface\n");
75+
LogPrint("zmq", "zmq: Initialize notification interface\n");
7676
assert(!pcontext);
7777

7878
pcontext = zmq_init(1);
@@ -110,7 +110,7 @@ bool CZMQNotificationInterface::Initialize()
110110
// Called during shutdown sequence
111111
void CZMQNotificationInterface::Shutdown()
112112
{
113-
LogPrint("zmq", "Shutdown notification interface\n");
113+
LogPrint("zmq", "zmq: Shutdown notification interface\n");
114114
if (pcontext)
115115
{
116116
for (std::list<CZMQAbstractNotifier*>::iterator i=notifiers.begin(); i!=notifiers.end(); ++i)

src/zmq/zmqpublishnotifier.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ bool CZMQAbstractPublishNotifier::Initialize(void *pcontext)
7878
}
7979
else
8080
{
81-
LogPrint("zmq", " Reuse socket for address %s\n", address);
81+
LogPrint("zmq", "zmq: Reusing socket for address %s\n", address);
8282

8383
psocket = i->second->psocket;
8484
mapPublishNotifiers.insert(std::make_pair(address, this));
@@ -120,7 +120,7 @@ void CZMQAbstractPublishNotifier::Shutdown()
120120
bool CZMQPublishHashBlockNotifier::NotifyBlock(const CBlockIndex *pindex)
121121
{
122122
uint256 hash = pindex->GetBlockHash();
123-
LogPrint("zmq", "Publish hash block %s\n", hash.GetHex());
123+
LogPrint("zmq", "zmq: Publish hashblock %s\n", hash.GetHex());
124124
char data[32];
125125
for (unsigned int i = 0; i < 32; i++)
126126
data[31 - i] = hash.begin()[i];
@@ -131,7 +131,7 @@ bool CZMQPublishHashBlockNotifier::NotifyBlock(const CBlockIndex *pindex)
131131
bool CZMQPublishHashTransactionNotifier::NotifyTransaction(const CTransaction &transaction)
132132
{
133133
uint256 hash = transaction.GetHash();
134-
LogPrint("zmq", "Publish hash transaction %s\n", hash.GetHex());
134+
LogPrint("zmq", "zmq: Publish hashtx %s\n", hash.GetHex());
135135
char data[32];
136136
for (unsigned int i = 0; i < 32; i++)
137137
data[31 - i] = hash.begin()[i];
@@ -141,7 +141,7 @@ bool CZMQPublishHashTransactionNotifier::NotifyTransaction(const CTransaction &t
141141

142142
bool CZMQPublishRawBlockNotifier::NotifyBlock(const CBlockIndex *pindex)
143143
{
144-
LogPrint("zmq", "Publish raw block %s\n", pindex->GetBlockHash().GetHex());
144+
LogPrint("zmq", "zmq: Publish rawblock %s\n", pindex->GetBlockHash().GetHex());
145145

146146
const Consensus::Params& consensusParams = Params().GetConsensus();
147147
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
@@ -164,7 +164,7 @@ bool CZMQPublishRawBlockNotifier::NotifyBlock(const CBlockIndex *pindex)
164164
bool CZMQPublishRawTransactionNotifier::NotifyTransaction(const CTransaction &transaction)
165165
{
166166
uint256 hash = transaction.GetHash();
167-
LogPrint("zmq", "Publish raw transaction %s\n", hash.GetHex());
167+
LogPrint("zmq", "zmq: Publish rawtx %s\n", hash.GetHex());
168168
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
169169
ss << transaction;
170170
int rc = zmq_send_multipart(psocket, "rawtx", 5, &(*ss.begin()), ss.size(), 0);

0 commit comments

Comments
 (0)