Optionally log messages to file (#11059)

* Add spdlog as submodule
* Add RiaFileLogger
* Control use of file logger from preferences
This commit is contained in:
Magne Sjaastad
2024-01-15 17:51:03 +01:00
committed by GitHub
parent caa42a89d3
commit 5c096748c8
13 changed files with 313 additions and 27 deletions

View File

@@ -103,8 +103,9 @@ void RiaConsoleApplication::initialize()
RiaApplication::initialize();
RiaLogging::setLoggerInstance( std::make_unique<RiaStdOutLogger>() );
RiaLogging::loggerInstance()->setLevel( int( RiaLogging::logLevelBasedOnPreferences() ) );
auto logger = std::make_unique<RiaStdOutLogger>();
logger->setLevel( int( RiaLogging::logLevelBasedOnPreferences() ) );
RiaLogging::appendLoggerInstance( std::move( logger ) );
m_socketServer = new RiaSocketServer( this );
}