1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

Change logging style

This commit is contained in:
Vadim Markovtsev
2016-10-03 20:32:01 +02:00
parent eac5aab396
commit 34cf92cb9b
7 changed files with 19 additions and 18 deletions

View File

@@ -34,7 +34,7 @@ void CBasicLogConfigurator::configure()
// Set log level
std::string level = loggerNode["level"].String();
logger->setLevel(getLogLevel(level));
logGlobal->debugStream() << "Set log level " << name << " => " << level;
logGlobal->debug("Set log level %s => %d", name, level);
}
}
CLogger::getGlobalLogger()->clearTargets();
@@ -80,15 +80,15 @@ void CBasicLogConfigurator::configure()
}
catch(const std::exception & e)
{
logGlobal->errorStream() << "Could not initialize the logging system due to configuration error/s."
<< "The logging system can be in a corrupted state. " << e.what();
logGlobal->error("Could not initialize the logging system due to configuration error/s."
"The logging system can be in a corrupted state. %s", e.what());
}
logGlobal->infoStream() << "Initialized logging system based on settings successfully.";
logGlobal->info("Initialized logging system based on settings successfully.");
for (auto& domain : CLogManager::get().getRegisteredDomains())
{
logGlobal->infoStream() << "[log level] " << domain << " => " <<
ELogLevel::to_string(CLogger::getLogger(CLoggerDomain(domain))->getLevel());
logGlobal->info("[log level] %s => %s", domain,
ELogLevel::to_string(CLogger::getLogger(CLoggerDomain(domain))->getLevel()));
}
}