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:
Alexey Rybalchenko
2015-12-02 16:24:47 +01:00
committed by Florian Uhlig
parent d254efb91f
commit 9a0a8c7516
3 changed files with 10 additions and 25 deletions

View File

@@ -60,19 +60,21 @@ int FairMQProgOptions::ParseAll(const int argc, char** argv, bool allowUnregiste
}
// set log level before printing (default is 0 = DEBUG level)
std::string verbose=GetValue<std::string>("verbose");
bool color_format=GetValue<bool>("log-color-format");
if(!color_format)
std::string verbose = GetValue<std::string>("verbose");
bool color = GetValue<bool>("log-color");
if (!color)
{
reinit_logger(false);
}
//SET_LOG_LEVEL(DEBUG);
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
{
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"));
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"));
}
PrintOptions();