diff --git a/examples/MQ/1-sampler-sink/FairMQExample1Sampler.cxx b/examples/MQ/1-sampler-sink/FairMQExample1Sampler.cxx index c325f16f..11a924ee 100644 --- a/examples/MQ/1-sampler-sink/FairMQExample1Sampler.cxx +++ b/examples/MQ/1-sampler-sink/FairMQExample1Sampler.cxx @@ -49,7 +49,7 @@ bool FairMQExample1Sampler::ConditionalRun() [](void* /*data*/, void* object) { delete static_cast(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; } diff --git a/examples/MQ/1-sampler-sink/FairMQExample1Sink.cxx b/examples/MQ/1-sampler-sink/FairMQExample1Sink.cxx index ea8ffbe9..7a21fbb7 100644 --- a/examples/MQ/1-sampler-sink/FairMQExample1Sink.cxx +++ b/examples/MQ/1-sampler-sink/FairMQExample1Sink.cxx @@ -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(msg->GetData()), msg->GetSize()) << "\""; + LOG(info) << "Received: \"" << string(static_cast(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; } diff --git a/examples/MQ/2-sampler-processor-sink/FairMQExample2Processor.cxx b/examples/MQ/2-sampler-processor-sink/FairMQExample2Processor.cxx index a0001ae2..c2c0f5f0 100644 --- a/examples/MQ/2-sampler-processor-sink/FairMQExample2Processor.cxx +++ b/examples/MQ/2-sampler-processor-sink/FairMQExample2Processor.cxx @@ -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(msg->GetData()), msg->GetSize()); diff --git a/examples/MQ/2-sampler-processor-sink/FairMQExample2Sampler.cxx b/examples/MQ/2-sampler-processor-sink/FairMQExample2Sampler.cxx index 0a80904e..471c9b29 100644 --- a/examples/MQ/2-sampler-processor-sink/FairMQExample2Sampler.cxx +++ b/examples/MQ/2-sampler-processor-sink/FairMQExample2Sampler.cxx @@ -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; } diff --git a/examples/MQ/2-sampler-processor-sink/FairMQExample2Sink.cxx b/examples/MQ/2-sampler-processor-sink/FairMQExample2Sink.cxx index 707bb2ca..907f2f7e 100644 --- a/examples/MQ/2-sampler-processor-sink/FairMQExample2Sink.cxx +++ b/examples/MQ/2-sampler-processor-sink/FairMQExample2Sink.cxx @@ -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(msg->GetData()), msg->GetSize()) << "\""; + LOG(info) << "Received: \"" << string(static_cast(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; } diff --git a/examples/MQ/3-dds/FairMQExample3Processor.cxx b/examples/MQ/3-dds/FairMQExample3Processor.cxx index 344bbf43..7af01b50 100644 --- a/examples/MQ/3-dds/FairMQExample3Processor.cxx +++ b/examples/MQ/3-dds/FairMQExample3Processor.cxx @@ -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(msg->GetData()), msg->GetSize()); diff --git a/examples/MQ/3-dds/FairMQExample3Sampler.cxx b/examples/MQ/3-dds/FairMQExample3Sampler.cxx index 04959fdb..5b8521d2 100644 --- a/examples/MQ/3-dds/FairMQExample3Sampler.cxx +++ b/examples/MQ/3-dds/FairMQExample3Sampler.cxx @@ -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). diff --git a/examples/MQ/3-dds/FairMQExample3Sink.cxx b/examples/MQ/3-dds/FairMQExample3Sink.cxx index 75d92c4e..329fc062 100644 --- a/examples/MQ/3-dds/FairMQExample3Sink.cxx +++ b/examples/MQ/3-dds/FairMQExample3Sink.cxx @@ -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(msg->GetData()), msg->GetSize()) << "\""; + LOG(info) << "Received: \"" << string(static_cast(msg->GetData()), msg->GetSize()) << "\""; // return true if want to be called again (otherwise go to IDLE state) return true; diff --git a/examples/MQ/4-copypush/FairMQExample4Sampler.cxx b/examples/MQ/4-copypush/FairMQExample4Sampler.cxx index e19da67f..517811e5 100644 --- a/examples/MQ/4-copypush/FairMQExample4Sampler.cxx +++ b/examples/MQ/4-copypush/FairMQExample4Sampler.cxx @@ -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; } diff --git a/examples/MQ/4-copypush/FairMQExample4Sink.cxx b/examples/MQ/4-copypush/FairMQExample4Sink.cxx index 54ef85f3..6e513e2b 100644 --- a/examples/MQ/4-copypush/FairMQExample4Sink.cxx +++ b/examples/MQ/4-copypush/FairMQExample4Sink.cxx @@ -33,11 +33,11 @@ void FairMQExample4Sink::InitTask() bool FairMQExample4Sink::HandleData(FairMQMessagePtr& msg, int /*index*/) { - LOG(INFO) << "Received message: \"" << *(static_cast(msg->GetData())) << "\""; + LOG(info) << "Received message: \"" << *(static_cast(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; } diff --git a/examples/MQ/5-req-rep/FairMQExample5Client.cxx b/examples/MQ/5-req-rep/FairMQExample5Client.cxx index 479afb6b..1ba1939e 100644 --- a/examples/MQ/5-req-rep/FairMQExample5Client.cxx +++ b/examples/MQ/5-req-rep/FairMQExample5Client.cxx @@ -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(reply->GetData()), reply->GetSize()) << "\""; + LOG(info) << "Received reply from server: \"" << string(static_cast(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; } diff --git a/examples/MQ/5-req-rep/FairMQExample5Server.cxx b/examples/MQ/5-req-rep/FairMQExample5Server.cxx index 293d1d30..cb81aa2c 100644 --- a/examples/MQ/5-req-rep/FairMQExample5Server.cxx +++ b/examples/MQ/5-req-rep/FairMQExample5Server.cxx @@ -33,11 +33,11 @@ void FairMQExample5Server::InitTask() bool FairMQExample5Server::HandleData(FairMQMessagePtr& request, int /*index*/) { - LOG(INFO) << "Received request from client: \"" << string(static_cast(request->GetData()), request->GetSize()) << "\""; + LOG(info) << "Received request from client: \"" << string(static_cast(request->GetData()), request->GetSize()) << "\""; string* text = new string("Thank you for the \"" + string(static_cast(request->GetData()), request->GetSize()) + "\"!"); - LOG(INFO) << "Sending reply to client."; + LOG(info) << "Sending reply to client."; FairMQMessagePtr reply(NewMessage(const_cast(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; } diff --git a/examples/MQ/6-multiple-channels/FairMQExample6Broadcaster.cxx b/examples/MQ/6-multiple-channels/FairMQExample6Broadcaster.cxx index 96875a31..818bb499 100644 --- a/examples/MQ/6-multiple-channels/FairMQExample6Broadcaster.cxx +++ b/examples/MQ/6-multiple-channels/FairMQExample6Broadcaster.cxx @@ -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"); diff --git a/examples/MQ/6-multiple-channels/FairMQExample6Sampler.cxx b/examples/MQ/6-multiple-channels/FairMQExample6Sampler.cxx index 2ceee5a9..30b39df5 100644 --- a/examples/MQ/6-multiple-channels/FairMQExample6Sampler.cxx +++ b/examples/MQ/6-multiple-channels/FairMQExample6Sampler.cxx @@ -50,7 +50,7 @@ void FairMQExample6Sampler::Run() if (Receive(msg, "broadcast") > 0) { - LOG(INFO) << "Received broadcast: \"" << string(static_cast(msg->GetData()), msg->GetSize()) << "\""; + LOG(info) << "Received broadcast: \"" << string(static_cast(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; } } diff --git a/examples/MQ/6-multiple-channels/FairMQExample6Sink.cxx b/examples/MQ/6-multiple-channels/FairMQExample6Sink.cxx index 1edef551..3520908a 100644 --- a/examples/MQ/6-multiple-channels/FairMQExample6Sink.cxx +++ b/examples/MQ/6-multiple-channels/FairMQExample6Sink.cxx @@ -37,7 +37,7 @@ void FairMQExample6Sink::InitTask() bool FairMQExample6Sink::HandleBroadcast(FairMQMessagePtr& msg, int /*index*/) { - LOG(INFO) << "Received broadcast: \"" << string(static_cast(msg->GetData()), msg->GetSize()) << "\""; + LOG(info) << "Received broadcast: \"" << string(static_cast(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(msg->GetData()), msg->GetSize()) << "\""; + LOG(info) << "Received message: \"" << string(static_cast(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; } } diff --git a/examples/MQ/8-multipart/FairMQExample8Sampler.cxx b/examples/MQ/8-multipart/FairMQExample8Sampler.cxx index 21610aab..aa0e1ffe 100644 --- a/examples/MQ/8-multipart/FairMQExample8Sampler.cxx +++ b/examples/MQ/8-multipart/FairMQExample8Sampler.cxx @@ -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; } diff --git a/examples/MQ/8-multipart/FairMQExample8Sink.cxx b/examples/MQ/8-multipart/FairMQExample8Sink.cxx index 5f3c77a7..c111c95d 100644 --- a/examples/MQ/8-multipart/FairMQExample8Sink.cxx +++ b/examples/MQ/8-multipart/FairMQExample8Sink.cxx @@ -28,14 +28,14 @@ bool FairMQExample8Sink::HandleData(FairMQParts& parts, int /*index*/) Ex8Header header; header.stopFlag = (static_cast(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; } diff --git a/examples/MQ/multiple-transports/FairMQExampleMTSampler1.cxx b/examples/MQ/multiple-transports/FairMQExampleMTSampler1.cxx index 19088709..35ebd1cb 100644 --- a/examples/MQ/multiple-transports/FairMQExampleMTSampler1.cxx +++ b/examples/MQ/multiple-transports/FairMQExampleMTSampler1.cxx @@ -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() diff --git a/examples/MQ/multiple-transports/FairMQExampleMTSampler2.cxx b/examples/MQ/multiple-transports/FairMQExampleMTSampler2.cxx index bd262aff..b70d955e 100644 --- a/examples/MQ/multiple-transports/FairMQExampleMTSampler2.cxx +++ b/examples/MQ/multiple-transports/FairMQExampleMTSampler2.cxx @@ -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; } diff --git a/examples/MQ/multiple-transports/FairMQExampleMTSink.cxx b/examples/MQ/multiple-transports/FairMQExampleMTSink.cxx index 133936b4..1863c5bd 100644 --- a/examples/MQ/multiple-transports/FairMQExampleMTSink.cxx +++ b/examples/MQ/multiple-transports/FairMQExampleMTSink.cxx @@ -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; } } diff --git a/examples/advanced/Region/FairMQExampleRegionSampler.cxx b/examples/advanced/Region/FairMQExampleRegionSampler.cxx index 217a23c6..84e3ee8c 100644 --- a/examples/advanced/Region/FairMQExampleRegionSampler.cxx +++ b/examples/advanced/Region/FairMQExampleRegionSampler.cxx @@ -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(); } diff --git a/examples/advanced/Region/FairMQExampleRegionSink.cxx b/examples/advanced/Region/FairMQExampleRegionSink.cxx index abdf8b5c..b1309a42 100644 --- a/examples/advanced/Region/FairMQExampleRegionSink.cxx +++ b/examples/advanced/Region/FairMQExampleRegionSink.cxx @@ -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; } }