fixes #0004000: Ability to suppress console output when running under python

This commit is contained in:
wmayer
2019-06-13 15:46:49 +02:00
parent 98a53884dc
commit fdcd36f251
4 changed files with 17 additions and 2 deletions

View File

@@ -1536,8 +1536,10 @@ void Application::initConfig(int argc, char ** argv)
// Init console ===========================================================
Base::PyGILStateLocker lock;
_pConsoleObserverStd = new ConsoleObserverStd();
Console().AttachObserver(_pConsoleObserverStd);
if (mConfig["LoggingConsole"] == "1") {
_pConsoleObserverStd = new ConsoleObserverStd();
Console().AttachObserver(_pConsoleObserverStd);
}
if (mConfig["Verbose"] == "Strict")
Console().UnsetConsoleMode(ConsoleSingleton::Verbose);