1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

vcmi: modernize lib/logging

This commit is contained in:
Konstantin
2023-02-15 00:35:06 +03:00
parent c8afef3408
commit c142bf1072
4 changed files with 13 additions and 29 deletions

View File

@ -37,7 +37,7 @@ void CBasicLogConfigurator::configure()
const JsonNode & loggers = loggingNode["loggers"];
if(!loggers.isNull())
{
for(auto & loggerNode : loggers.Vector())
for(const auto & loggerNode : loggers.Vector())
{
// Get logger
std::string name = loggerNode["domain"].String();
@ -148,6 +148,7 @@ void CBasicLogConfigurator::deconfigure()
auto l = CLogger::getGlobalLogger();
if(l != nullptr)
l->clearTargets();
appendToLogFile = true;
}
VCMI_LIB_NAMESPACE_END