Add handler for Python logging module.

This commit is contained in:
Mikaël Capelle
2020-11-09 18:23:57 +01:00
parent c2c63e0624
commit 5f8e1803c0
3 changed files with 82 additions and 0 deletions
+3
View File
@@ -39,6 +39,7 @@
#include "tuple_helper.h"
#include "variant_helper.h"
#include "converters.h"
#include "pylogger.h"
using namespace MOBase;
@@ -1196,6 +1197,8 @@ bool PythonRunner::initPython(const QString &pythonPath)
"sys.excepthook = lambda x, y, z: sys.__excepthook__(x, y, z)\n",
mainNamespace);
configure_python_logging();
PyEval_SaveThread();
return true;
} catch (const bpy::error_already_set&) {