summaryrefslogtreecommitdiff
path: root/src/py/libcamera/py_main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/py/libcamera/py_main.cpp')
-rw-r--r--src/py/libcamera/py_main.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/py/libcamera/py_main.cpp b/src/py/libcamera/py_main.cpp
index 505cc3dc..4b698f77 100644
--- a/src/py/libcamera/py_main.cpp
+++ b/src/py/libcamera/py_main.cpp
@@ -5,6 +5,8 @@
* Python bindings
*/
+#include "py_main.h"
+
#include <mutex>
#include <stdexcept>
#include <sys/eventfd.h>
@@ -23,6 +25,12 @@ namespace py = pybind11;
using namespace libcamera;
+namespace libcamera {
+
+LOG_DEFINE_CATEGORY(Python)
+
+}
+
template<typename T>
static py::object valueOrTuple(const ControlValue &cv)
{
@@ -120,10 +128,10 @@ static void handleRequestCompleted(Request *req)
size_t s = write(gEventfd, &v, 8);
/*
* We should never fail, and have no simple means to manage the error,
- * so let's use LOG(Fatal).
+ * so let's log a fatal error.
*/
if (s != 8)
- LOG(Fatal) << "Unable to write to eventfd";
+ LOG(Python, Fatal) << "Unable to write to eventfd";
}
void init_py_enums(py::module &m);