mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 08:41:16 +00:00
Add a acknowledgement channel to Tutorial 3...
- ...to measure performance of the serialization libraries. - Rename `--log-color-format` cmd option to `--log-color`.
This commit is contained in:
parent
d254efb91f
commit
9a0a8c7516
|
@ -15,24 +15,7 @@
|
||||||
#include "FairMQParser.h"
|
#include "FairMQParser.h"
|
||||||
#include "FairMQLogger.h"
|
#include "FairMQLogger.h"
|
||||||
#include <boost/property_tree/xml_parser.hpp>
|
#include <boost/property_tree/xml_parser.hpp>
|
||||||
|
#include <boost/property_tree/json_parser.hpp>
|
||||||
// WARNING : pragma commands to hide boost (1.54.0) warning
|
|
||||||
// TODO : remove these pragma commands when boost will fix this issue in future release
|
|
||||||
#if defined(__clang__)
|
|
||||||
_Pragma("clang diagnostic push")
|
|
||||||
_Pragma("clang diagnostic ignored \"-Wshadow\"")
|
|
||||||
#include <boost/property_tree/json_parser.hpp>
|
|
||||||
_Pragma("clang diagnostic pop")
|
|
||||||
#elif defined(__GNUC__) || defined(__GNUG__)
|
|
||||||
_Pragma("GCC diagnostic push")
|
|
||||||
_Pragma("GCC diagnostic ignored \"-Wshadow\"")
|
|
||||||
#include <boost/property_tree/json_parser.hpp>
|
|
||||||
_Pragma("GCC diagnostic pop")
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
|
@ -60,19 +60,21 @@ int FairMQProgOptions::ParseAll(const int argc, char** argv, bool allowUnregiste
|
||||||
}
|
}
|
||||||
|
|
||||||
// set log level before printing (default is 0 = DEBUG level)
|
// set log level before printing (default is 0 = DEBUG level)
|
||||||
std::string verbose=GetValue<std::string>("verbose");
|
std::string verbose = GetValue<std::string>("verbose");
|
||||||
bool color_format=GetValue<bool>("log-color-format");
|
bool color = GetValue<bool>("log-color");
|
||||||
if(!color_format)
|
if (!color)
|
||||||
|
{
|
||||||
reinit_logger(false);
|
reinit_logger(false);
|
||||||
|
}
|
||||||
//SET_LOG_LEVEL(DEBUG);
|
//SET_LOG_LEVEL(DEBUG);
|
||||||
if (fSeverityMap.count(verbose))
|
if (fSeverityMap.count(verbose))
|
||||||
{
|
{
|
||||||
set_global_log_level(log_op::operation::GREATER_EQ_THAN,fSeverityMap.at(verbose));
|
set_global_log_level(log_op::operation::GREATER_EQ_THAN, fSeverityMap.at(verbose));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOG(ERROR)<<" verbosity level '"<<verbose<<"' unknown, it will be set to DEBUG";
|
LOG(ERROR) << " verbosity level '" << verbose << "' unknown, it will be set to DEBUG";
|
||||||
set_global_log_level(log_op::operation::GREATER_EQ_THAN,fSeverityMap.at("DEBUG"));
|
set_global_log_level(log_op::operation::GREATER_EQ_THAN, fSeverityMap.at("DEBUG"));
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintOptions();
|
PrintOptions();
|
||||||
|
|
|
@ -42,7 +42,7 @@ FairProgOptions::FairProgOptions() :
|
||||||
" STATE \n"
|
" STATE \n"
|
||||||
" NOLOG"
|
" NOLOG"
|
||||||
)
|
)
|
||||||
("log-color-format", po::value<bool>()->default_value(true), "logger color format : true or false")
|
("log-color", po::value<bool>()->default_value(true), "logger color: true or false")
|
||||||
;
|
;
|
||||||
|
|
||||||
fSeverityMap["TRACE"] = fairmq::severity_level::TRACE;
|
fSeverityMap["TRACE"] = fairmq::severity_level::TRACE;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user