*/
#define BT_LOG_TAG "PLUGIN-PY"
-#include <babeltrace/lib-logging-internal.h>
+#include "logging.h"
#include <babeltrace/babeltrace-internal.h>
#include <babeltrace/compiler-internal.h>
}
if (!Py_IsInitialized()) {
+ BT_LOGI_STR("Python interpreter is not initialized: initializing Python interpreter.");
Py_InitializeEx(0);
BT_LOGI("Initialized Python interpreter: version=\"%s\"",
Py_GetVersion());
+ } else {
+ BT_LOGI("Python interpreter is already initialized: version=\"%s\"",
+ Py_GetVersion());
}
py_bt2_py_plugin_mod = PyImport_ImportModule("bt2.py_plugin");