Merge pull request #77 from Holt59/logging-module

Add handler for Python logging module.
This commit is contained in:
Mikaël Capelle
2020-11-16 09:13:28 +01:00
committed by GitHub
3 changed files with 90 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(mainNamespace["mobase"]);
PyEval_SaveThread();
return true;
} catch (const bpy::error_already_set&) {