mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-27 07:30:20 -05:00
#14446 Initialize loggers before reading cloud config files
Cloud services are configured from RiaApplication::initialize(), which runs before the subclasses append their logger instances. All messages from the cloud config file search were therefore dropped. Add a virtual initializeLoggers() called before the cloud configuration is read, and move creation of the file logger and the std out logger into the overrides. The message panel logger depends on the main windows, and is still created in RiaGuiApplication::initialize(). Do not write fields with IO disabled to the application store, mirroring the check already present when reading. This stops the cloud service configuration from being persisted into the user preferences file.
This commit is contained in:
1 parent
1aa95936fc
commit
5efcf88949
7 files changed
+39
-12
No files matched your search
@@ -109,6 +109,14 @@ void RiaConsoleApplication::initialize()
|
||||
|
||||
RiaApplication::initialize();
|
||||
|
||||
m_socketServer = new RiaSocketServer( this );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaConsoleApplication::initializeLoggers()
|
||||
{
|
||||
auto logger = std::make_unique<RiaStdOutLogger>();
|
||||
|
||||
// Use command line log level if provided, otherwise use preference-based level
|
||||
@@ -122,8 +130,6 @@ void RiaConsoleApplication::initialize()
|
||||
}
|
||||
|
||||
RiaLogging::appendLoggerInstance( std::move( logger ) );
|
||||
|
||||
m_socketServer = new RiaSocketServer( this );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user