diff --git a/fairmq/FairMQLogger.h b/fairmq/FairMQLogger.h index 015d875e..052dee0a 100644 --- a/fairmq/FairMQLogger.h +++ b/fairmq/FairMQLogger.h @@ -32,9 +32,9 @@ DEBUG, RESULTS, INFO, + STATE, WARN, ERROR, - STATE, NOLOG }; diff --git a/fairmq/logger/logger_def.h b/fairmq/logger/logger_def.h index fc9efd83..19d7d235 100644 --- a/fairmq/logger/logger_def.h +++ b/fairmq/logger/logger_def.h @@ -31,9 +31,9 @@ enum severity_level DEBUG, RESULTS, INFO, + STATE, WARN, ERROR, - STATE, NOLOG }; @@ -44,9 +44,9 @@ static const std::array g_LogSeverityLevelString "DEBUG", "RESULTS", "INFO", + "STATE", "WARN", "ERROR", - "STATE", "NOLOG" } }; diff --git a/fairmq/nanomsg/FairMQSocketNN.cxx b/fairmq/nanomsg/FairMQSocketNN.cxx index c63d659d..ce9130eb 100644 --- a/fairmq/nanomsg/FairMQSocketNN.cxx +++ b/fairmq/nanomsg/FairMQSocketNN.cxx @@ -212,8 +212,8 @@ int FairMQSocketNN::Receive(FairMQMessagePtr& msg, const int flags) int64_t FairMQSocketNN::Send(vector>& msgVec, const int flags) { -#ifdef MSGPACK_FOUND const unsigned int vecSize = msgVec.size(); +#ifdef MSGPACK_FOUND // create msgpack simple buffer msgpack::sbuffer sbuf; diff --git a/fairmq/test/pub-sub/runTestPub.cxx b/fairmq/test/pub-sub/runTestPub.cxx index 60041934..4c8deed2 100644 --- a/fairmq/test/pub-sub/runTestPub.cxx +++ b/fairmq/test/pub-sub/runTestPub.cxx @@ -17,6 +17,8 @@ int main(int argc, char** argv) { + reinit_logger(false); + FairMQTestPub testPub; testPub.CatchSignals(); @@ -38,8 +40,6 @@ int main(int argc, char** argv) return 1; } - reinit_logger(false); - testPub.SetProperty(FairMQTestPub::Id, "testPub"); FairMQChannel controlChannel("pull", "bind", "tcp://127.0.0.1:5555"); diff --git a/fairmq/test/pub-sub/runTestSub.cxx b/fairmq/test/pub-sub/runTestSub.cxx index f06ff875..3540ccad 100644 --- a/fairmq/test/pub-sub/runTestSub.cxx +++ b/fairmq/test/pub-sub/runTestSub.cxx @@ -19,6 +19,9 @@ int main(int argc, char** argv) { + reinit_logger(false); + SET_LOG_CONSOLE_LEVEL(WARN); + FairMQTestSub testSub; testSub.CatchSignals(); @@ -40,9 +43,6 @@ int main(int argc, char** argv) return 1; } - reinit_logger(false); - SET_LOG_CONSOLE_LEVEL(NOLOG); - testSub.SetProperty(FairMQTestSub::Id, "testSub_" + std::to_string(getpid())); FairMQChannel controlChannel("push", "connect", "tcp://127.0.0.1:5555"); diff --git a/fairmq/test/push-pull/runTestPull.cxx b/fairmq/test/push-pull/runTestPull.cxx index 74aa1c16..52035e22 100644 --- a/fairmq/test/push-pull/runTestPull.cxx +++ b/fairmq/test/push-pull/runTestPull.cxx @@ -17,6 +17,8 @@ int main(int argc, char** argv) { + reinit_logger(false); + FairMQTestPull testPull; testPull.CatchSignals(); @@ -38,8 +40,6 @@ int main(int argc, char** argv) return 1; } - reinit_logger(false); - testPull.SetProperty(FairMQTestPull::Id, "testPull"); FairMQChannel pullChannel("pull", "connect", "tcp://127.0.0.1:5557"); diff --git a/fairmq/test/push-pull/runTestPush.cxx b/fairmq/test/push-pull/runTestPush.cxx index fa6eb0fa..99cf2c4f 100644 --- a/fairmq/test/push-pull/runTestPush.cxx +++ b/fairmq/test/push-pull/runTestPush.cxx @@ -17,6 +17,9 @@ int main(int argc, char** argv) { + reinit_logger(false); + SET_LOG_CONSOLE_LEVEL(WARN); + FairMQTestPush testPush; testPush.CatchSignals(); @@ -38,9 +41,6 @@ int main(int argc, char** argv) return 1; } - reinit_logger(false); - SET_LOG_CONSOLE_LEVEL(NOLOG); - testPush.SetProperty(FairMQTestPush::Id, "testPush"); FairMQChannel pushChannel("push", "bind", "tcp://127.0.0.1:5557"); diff --git a/fairmq/test/req-rep/runTestRep.cxx b/fairmq/test/req-rep/runTestRep.cxx index 3e8b528d..8b9f0c7d 100644 --- a/fairmq/test/req-rep/runTestRep.cxx +++ b/fairmq/test/req-rep/runTestRep.cxx @@ -19,6 +19,8 @@ int main(int argc, char** argv) { + reinit_logger(false); + FairMQTestRep testRep; testRep.CatchSignals(); @@ -40,8 +42,6 @@ int main(int argc, char** argv) return 1; } - reinit_logger(false); - testRep.SetProperty(FairMQTestRep::Id, "testRep"); FairMQChannel repChannel("rep", "bind", "tcp://127.0.0.1:5558"); diff --git a/fairmq/test/req-rep/runTestReq.cxx b/fairmq/test/req-rep/runTestReq.cxx index 51179ce7..5f0e1d3c 100644 --- a/fairmq/test/req-rep/runTestReq.cxx +++ b/fairmq/test/req-rep/runTestReq.cxx @@ -19,6 +19,9 @@ int main(int argc, char** argv) { + reinit_logger(false); + SET_LOG_CONSOLE_LEVEL(WARN); + FairMQTestReq testReq; testReq.CatchSignals(); @@ -40,9 +43,6 @@ int main(int argc, char** argv) return 1; } - reinit_logger(false); - SET_LOG_CONSOLE_LEVEL(NOLOG); - testReq.SetProperty(FairMQTestReq::Id, "testReq" + std::to_string(getpid())); FairMQChannel reqChannel("req", "connect", "tcp://127.0.0.1:5558");