convert log severities use to lowercase and remove use of MQLOG

This commit is contained in:
Alexey Rybalchenko 2017-12-22 10:40:50 +01:00
parent 6d97b86d37
commit b3292252bf
22 changed files with 44 additions and 44 deletions

View File

@ -49,7 +49,7 @@ bool FairMQExample1Sampler::ConditionalRun()
[](void* /*data*/, void* object) { delete static_cast<string*>(object); },
text));
LOG(INFO) << "Sending \"" << fText << "\"";
LOG(info) << "Sending \"" << fText << "\"";
// in case of error or transfer interruption, return false to go to IDLE state
// successfull transfer will return number of bytes transfered (can be 0 if sending an empty message).
@ -59,7 +59,7 @@ bool FairMQExample1Sampler::ConditionalRun()
}
else if (fMaxIterations > 0 && ++fNumIterations >= fMaxIterations)
{
LOG(INFO) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
LOG(info) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
return false;
}

View File

@ -35,11 +35,11 @@ void FairMQExample1Sink::InitTask()
// handler is called whenever a message arrives on "data", with a reference to the message and a sub-channel index (here 0)
bool FairMQExample1Sink::HandleData(FairMQMessagePtr& msg, int /*index*/)
{
LOG(INFO) << "Received: \"" << string(static_cast<char*>(msg->GetData()), msg->GetSize()) << "\"";
LOG(info) << "Received: \"" << string(static_cast<char*>(msg->GetData()), msg->GetSize()) << "\"";
if (fMaxIterations > 0 && ++fNumIterations >= fMaxIterations)
{
LOG(INFO) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
LOG(info) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
return false;
}

View File

@ -20,7 +20,7 @@ FairMQExample2Processor::FairMQExample2Processor()
bool FairMQExample2Processor::HandleData(FairMQMessagePtr& msg, int /*index*/)
{
LOG(INFO) << "Received data, processing...";
LOG(info) << "Received data, processing...";
// Modify the received string
string* text = new std::string(static_cast<char*>(msg->GetData()), msg->GetSize());

View File

@ -41,7 +41,7 @@ bool FairMQExample2Sampler::ConditionalRun()
// but won't delete the data after the sending is completed.
FairMQMessagePtr msg(NewStaticMessage(fText));
LOG(INFO) << "Sending \"" << fText << "\"";
LOG(info) << "Sending \"" << fText << "\"";
// in case of error or transfer interruption, return false to go to IDLE state
// successfull transfer will return number of bytes transfered (can be 0 if sending an empty message).
@ -51,7 +51,7 @@ bool FairMQExample2Sampler::ConditionalRun()
}
else if (fMaxIterations > 0 && ++fNumIterations >= fMaxIterations)
{
LOG(INFO) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
LOG(info) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
return false;
}

View File

@ -35,11 +35,11 @@ void FairMQExample2Sink::InitTask()
// handler is called whenever a message arrives on "data2", with a reference to the message and a sub-channel index (here 0)
bool FairMQExample2Sink::HandleData(FairMQMessagePtr& msg, int /*index*/)
{
LOG(INFO) << "Received: \"" << string(static_cast<char*>(msg->GetData()), msg->GetSize()) << "\"";
LOG(info) << "Received: \"" << string(static_cast<char*>(msg->GetData()), msg->GetSize()) << "\"";
if (fMaxIterations > 0 && ++fNumIterations >= fMaxIterations)
{
LOG(INFO) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
LOG(info) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
return false;
}

View File

@ -18,7 +18,7 @@ FairMQExample3Processor::FairMQExample3Processor()
bool FairMQExample3Processor::HandleData(FairMQMessagePtr& msg, int /*index*/)
{
LOG(INFO) << "Received data, processing...";
LOG(info) << "Received data, processing...";
// Modify the received string
string* text = new std::string(static_cast<char*>(msg->GetData()), msg->GetSize());

View File

@ -33,7 +33,7 @@ bool FairMQExample3Sampler::ConditionalRun()
// Should only be used for small data because of the cost of an additional copy
FairMQMessagePtr msg(NewSimpleMessage("Data"));
LOG(INFO) << "Sending \"Data\"";
LOG(info) << "Sending \"Data\"";
// in case of error or transfer interruption, return false to go to IDLE state
// successfull transfer will return number of bytes transfered (can be 0 if sending an empty message).

View File

@ -26,7 +26,7 @@ FairMQExample3Sink::FairMQExample3Sink()
// handler is called whenever a message arrives on "data2", with a reference to the message and a sub-channel index (here 0)
bool FairMQExample3Sink::HandleData(FairMQMessagePtr& msg, int /*index*/)
{
LOG(INFO) << "Received: \"" << string(static_cast<char*>(msg->GetData()), msg->GetSize()) << "\"";
LOG(info) << "Received: \"" << string(static_cast<char*>(msg->GetData()), msg->GetSize()) << "\"";
// return true if want to be called again (otherwise go to IDLE state)
return true;

View File

@ -52,7 +52,7 @@ bool FairMQExample4Sampler::ConditionalRun()
if (fMaxIterations > 0 && ++fNumIterations >= fMaxIterations)
{
LOG(INFO) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
LOG(info) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
return false;
}

View File

@ -33,11 +33,11 @@ void FairMQExample4Sink::InitTask()
bool FairMQExample4Sink::HandleData(FairMQMessagePtr& msg, int /*index*/)
{
LOG(INFO) << "Received message: \"" << *(static_cast<uint64_t*>(msg->GetData())) << "\"";
LOG(info) << "Received message: \"" << *(static_cast<uint64_t*>(msg->GetData())) << "\"";
if (fMaxIterations > 0 && ++fNumIterations >= fMaxIterations)
{
LOG(INFO) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
LOG(info) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
return false;
}

View File

@ -50,17 +50,17 @@ bool FairMQExample5Client::ConditionalRun()
text)); // object that manages the data
FairMQMessagePtr reply(NewMessage());
LOG(INFO) << "Sending \"" << fText << "\" to server.";
LOG(info) << "Sending \"" << fText << "\" to server.";
if (Send(request, "data") > 0)
{
if (Receive(reply, "data") >= 0)
{
LOG(INFO) << "Received reply from server: \"" << string(static_cast<char*>(reply->GetData()), reply->GetSize()) << "\"";
LOG(info) << "Received reply from server: \"" << string(static_cast<char*>(reply->GetData()), reply->GetSize()) << "\"";
if (fMaxIterations > 0 && ++fNumIterations >= fMaxIterations)
{
LOG(INFO) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
LOG(info) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
return false;
}

View File

@ -33,11 +33,11 @@ void FairMQExample5Server::InitTask()
bool FairMQExample5Server::HandleData(FairMQMessagePtr& request, int /*index*/)
{
LOG(INFO) << "Received request from client: \"" << string(static_cast<char*>(request->GetData()), request->GetSize()) << "\"";
LOG(info) << "Received request from client: \"" << string(static_cast<char*>(request->GetData()), request->GetSize()) << "\"";
string* text = new string("Thank you for the \"" + string(static_cast<char*>(request->GetData()), request->GetSize()) + "\"!");
LOG(INFO) << "Sending reply to client.";
LOG(info) << "Sending reply to client.";
FairMQMessagePtr reply(NewMessage(const_cast<char*>(text->c_str()), // data
text->length(), // size
@ -48,7 +48,7 @@ bool FairMQExample5Server::HandleData(FairMQMessagePtr& request, int /*index*/)
{
if (fMaxIterations > 0 && ++fNumIterations >= fMaxIterations)
{
LOG(INFO) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
LOG(info) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
return false;
}

View File

@ -32,7 +32,7 @@ bool FairMQExample6Broadcaster::ConditionalRun()
// Should only be used for small data because of the cost of an additional copy
FairMQMessagePtr msg(NewSimpleMessage("OK"));
LOG(INFO) << "Sending OK";
LOG(info) << "Sending OK";
Send(msg, "broadcast");

View File

@ -50,7 +50,7 @@ void FairMQExample6Sampler::Run()
if (Receive(msg, "broadcast") > 0)
{
LOG(INFO) << "Received broadcast: \"" << string(static_cast<char*>(msg->GetData()), msg->GetSize()) << "\"";
LOG(info) << "Received broadcast: \"" << string(static_cast<char*>(msg->GetData()), msg->GetSize()) << "\"";
}
}
@ -62,11 +62,11 @@ void FairMQExample6Sampler::Run()
if (Send(msg, "data") > 0)
{
LOG(INFO) << "Sent \"" << fText << "\"";
LOG(info) << "Sent \"" << fText << "\"";
if (fMaxIterations > 0 && ++fNumIterations >= fMaxIterations)
{
LOG(INFO) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
LOG(info) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
break;
}
}

View File

@ -37,7 +37,7 @@ void FairMQExample6Sink::InitTask()
bool FairMQExample6Sink::HandleBroadcast(FairMQMessagePtr& msg, int /*index*/)
{
LOG(INFO) << "Received broadcast: \"" << string(static_cast<char*>(msg->GetData()), msg->GetSize()) << "\"";
LOG(info) << "Received broadcast: \"" << string(static_cast<char*>(msg->GetData()), msg->GetSize()) << "\"";
fReceivedBroadcast = true;
return CheckIterations();
@ -45,7 +45,7 @@ bool FairMQExample6Sink::HandleBroadcast(FairMQMessagePtr& msg, int /*index*/)
bool FairMQExample6Sink::HandleData(FairMQMessagePtr& msg, int /*index*/)
{
LOG(INFO) << "Received message: \"" << string(static_cast<char*>(msg->GetData()), msg->GetSize()) << "\"";
LOG(info) << "Received message: \"" << string(static_cast<char*>(msg->GetData()), msg->GetSize()) << "\"";
fReceivedData = true;
return CheckIterations();
@ -57,7 +57,7 @@ bool FairMQExample6Sink::CheckIterations()
{
if (fReceivedData && fReceivedBroadcast && ++fNumIterations >= fMaxIterations)
{
LOG(INFO) << "Configured maximum number of iterations reached & Received messages from both sources. Leaving RUNNING state.";
LOG(info) << "Configured maximum number of iterations reached & Received messages from both sources. Leaving RUNNING state.";
return false;
}
}

View File

@ -43,7 +43,7 @@ bool FairMQExample8Sampler::ConditionalRun()
{
header.stopFlag = 1;
}
LOG(INFO) << "Sending header with stopFlag: " << header.stopFlag;
LOG(info) << "Sending header with stopFlag: " << header.stopFlag;
FairMQParts parts;
@ -52,14 +52,14 @@ bool FairMQExample8Sampler::ConditionalRun()
parts.AddPart(NewSimpleMessage(header));
parts.AddPart(NewMessage(1000));
LOG(INFO) << "Sending body of size: " << parts.At(1)->GetSize();
LOG(info) << "Sending body of size: " << parts.At(1)->GetSize();
Send(parts, "data-out");
// Go out of the sending loop if the stopFlag was sent.
if (fMaxIterations > 0 && ++fNumIterations >= fMaxIterations)
{
LOG(INFO) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
LOG(info) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
return false;
}

View File

@ -28,14 +28,14 @@ bool FairMQExample8Sink::HandleData(FairMQParts& parts, int /*index*/)
Ex8Header header;
header.stopFlag = (static_cast<Ex8Header*>(parts.At(0)->GetData()))->stopFlag;
LOG(INFO) << "Received message with " << parts.Size() << " parts";
LOG(info) << "Received message with " << parts.Size() << " parts";
LOG(INFO) << "Received header with stopFlag: " << header.stopFlag;
LOG(INFO) << "Received body of size: " << parts.At(1)->GetSize();
LOG(info) << "Received header with stopFlag: " << header.stopFlag;
LOG(info) << "Received body of size: " << parts.At(1)->GetSize();
if (header.stopFlag == 1)
{
LOG(INFO) << "stopFlag is 1, going IDLE";
LOG(info) << "stopFlag is 1, going IDLE";
return false;
}

View File

@ -43,7 +43,7 @@ bool FairMQExampleMTSampler1::ConditionalRun()
if (fMaxIterations > 0 && ++fNumIterations >= fMaxIterations)
{
LOG(INFO) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
LOG(info) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
return false;
}
@ -69,7 +69,7 @@ void FairMQExampleMTSampler1::ListenForAcks()
++numAcks;
}
LOG(INFO) << "Acknowledged " << numAcks << " messages";
LOG(info) << "Acknowledged " << numAcks << " messages";
}
FairMQExampleMTSampler1::~FairMQExampleMTSampler1()

View File

@ -36,7 +36,7 @@ bool FairMQExampleMTSampler2::ConditionalRun()
if (fMaxIterations > 0 && ++fNumIterations >= fMaxIterations)
{
LOG(INFO) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
LOG(info) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
return false;
}

View File

@ -64,7 +64,7 @@ bool FairMQExampleMTSink::CheckIterations()
{
if (fNumIterations1 >= fMaxIterations && fNumIterations2 >= fMaxIterations)
{
LOG(INFO) << "Configured maximum number of iterations reached & Received messages from both sources. Leaving RUNNING state.";
LOG(info) << "Configured maximum number of iterations reached & Received messages from both sources. Leaving RUNNING state.";
return false;
}
}

View File

@ -42,7 +42,7 @@ void FairMQExampleRegionSampler::InitTask()
--fNumUnackedMsgs;
if (fMaxIterations > 0)
{
LOG(DEBUG) << "Received ack";
LOG(debug) << "Received ack";
}
}
));
@ -64,7 +64,7 @@ bool FairMQExampleRegionSampler::ConditionalRun()
if (fMaxIterations > 0 && ++fNumIterations >= fMaxIterations)
{
LOG(INFO) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
LOG(info) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
return false;
}
}
@ -77,9 +77,9 @@ void FairMQExampleRegionSampler::ResetTask()
// if not all messages acknowledged, wait for a bit. But only once, since receiver could be already dead.
if (fNumUnackedMsgs != 0)
{
LOG(DEBUG) << "waiting for all acknowledgements... (" << fNumUnackedMsgs << ")";
LOG(debug) << "waiting for all acknowledgements... (" << fNumUnackedMsgs << ")";
this_thread::sleep_for(chrono::milliseconds(500));
LOG(DEBUG) << "done, still unacked: " << fNumUnackedMsgs;
LOG(debug) << "done, still unacked: " << fNumUnackedMsgs;
}
fRegion.reset();
}

View File

@ -42,7 +42,7 @@ void FairMQExampleRegionSink::Run()
if (fMaxIterations > 0 && ++fNumIterations >= fMaxIterations)
{
LOG(INFO) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
LOG(info) << "Configured maximum number of iterations reached. Leaving RUNNING state.";
break;
}
}