Skip to content

Commit

Permalink
Decrease level and severity of some recurrent logs (#648)
Browse files Browse the repository at this point in the history
  • Loading branch information
knopers8 authored Mar 23, 2021
1 parent 608d120 commit 4c52615
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
10 changes: 4 additions & 6 deletions Framework/include/QualityControl/RootClassFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,17 @@ template <typename T>
T* create(std::string moduleName, std::string className)
{
T* result = nullptr;
QcInfoLogger& logger = QcInfoLogger::GetInstance();

// Load the library
std::string library = bfs::path(moduleName).is_absolute() ? moduleName : "libO2" + moduleName;
logger << "Loading library " << library << AliceO2::InfoLogger::InfoLogger::endm;
ILOG(Info, Devel) << "Loading library " << library << ENDM;
int libLoaded = gSystem->Load(library.c_str(), "", true);
if (libLoaded < 0) {
BOOST_THROW_EXCEPTION(FatalException() << errinfo_details("Failed to load Detector Publisher Library"));
}

// Get the class and instantiate
logger << "Loading class " << className << AliceO2::InfoLogger::InfoLogger::endm;
ILOG(Info, Devel) << "Loading class " << className << ENDM;
TClass* cl = TClass::GetClass(className.c_str());
std::string tempString("Failed to instantiate Quality Control Module");
if (!cl) {
Expand All @@ -63,13 +62,12 @@ T* create(std::string moduleName, std::string className)
tempString += "\" could be retrieved";
BOOST_THROW_EXCEPTION(FatalException() << errinfo_details(tempString));
}
logger << "Instantiating class " << className << " (" << cl << ")"
<< AliceO2::InfoLogger::InfoLogger::endm;
ILOG(Info, Devel) << "Instantiating class " << className << " (" << cl << ")" << ENDM;
result = static_cast<T*>(cl->New());
if (!result) {
BOOST_THROW_EXCEPTION(FatalException() << errinfo_details(tempString));
}
logger << "QualityControl Module " << moduleName << " loaded " << AliceO2::InfoLogger::InfoLogger::endm;
ILOG(Info, Devel) << "QualityControl Module " << moduleName << " loaded " << ENDM;

return result;
}
Expand Down
8 changes: 4 additions & 4 deletions Framework/src/InfrastructureGenerator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ void InfrastructureGenerator::customizeInfrastructure(std::vector<framework::Com
void InfrastructureGenerator::printVersion()
{
// Log the version number
QcInfoLogger::GetInstance() << "QC version " << o2::quality_control::core::Version::GetQcVersion().getString() << infologger::endm;
ILOG(Info, Support) << "QC version " << o2::quality_control::core::Version::GetQcVersion().getString() << ENDM;
}

void InfrastructureGenerator::generateDataSamplingPolicyLocalProxy(framework::WorkflowSpec& workflow,
Expand Down Expand Up @@ -387,7 +387,7 @@ vector<OutputSpec> InfrastructureGenerator::generateCheckRunners(framework::Work
if (config->getRecursive("qc").count("checks")) {
// For every check definition, create a Check
for (const auto& [checkName, checkConfig] : config->getRecursive("qc.checks")) {
QcInfoLogger::GetInstance() << ">> Check name : " << checkName << AliceO2::InfoLogger::InfoLogger::endm;
ILOG(Debug, Devel) << ">> Check name : " << checkName << ENDM;
if (checkConfig.get<bool>("active", true)) {
auto check = Check(checkName, configurationSource);
InputNames inputNames;
Expand Down Expand Up @@ -466,7 +466,7 @@ void InfrastructureGenerator::generateAggregator(WorkflowSpec& workflow, std::st
// TODO consider whether we should recompute checkRunnerOutputs instead of receiving it all baked.
auto config = ConfigurationFactory::getConfiguration(configurationSource);
if (config->getRecursive("qc").count("aggregators") == 0) {
ILOG(Warning, Devel) << "No \"aggregators\" structure found in the config file. If no postprocessing is expected, then it is completely fine." << ENDM;
ILOG(Debug, Devel) << "No \"aggregators\" structure found in the config file. If no quality aggregation is expected, then it is completely fine." << ENDM;
return;
}
DataProcessorSpec spec = AggregatorRunnerFactory::create(checkRunnerOutputs, configurationSource);
Expand All @@ -477,7 +477,7 @@ void InfrastructureGenerator::generatePostProcessing(WorkflowSpec& workflow, std
{
auto config = ConfigurationFactory::getConfiguration(configurationSource);
if (config->getRecursive("qc").count("postprocessing") == 0) {
ILOG(Warning, Devel) << "No \"postprocessing\" structure found in the config file. If no postprocessing is expected, then it is completely fine." << ENDM;
ILOG(Debug, Devel) << "No \"postprocessing\" structure found in the config file. If no postprocessing is expected, then it is completely fine." << ENDM;
return;
}
for (const auto& [ppTaskName, ppTaskConfig] : config->getRecursive("qc.postprocessing")) {
Expand Down

0 comments on commit 4c52615

Please sign in to comment.