| 12 | namespace aimrt::runtime::python_runtime { |
| 13 | |
| 14 | inline void ExportLoggerRef(pybind11::object m) { |
| 15 | using aimrt::logger::LoggerRef; |
| 16 | |
| 17 | pybind11::class_<LoggerRef>(std::move(m), "LoggerRef") |
| 18 | .def(pybind11::init<>()) |
| 19 | .def("__bool__", &LoggerRef::operator bool) |
| 20 | .def("GetLogLevel", &LoggerRef::GetLogLevel) |
| 21 | .def("Log", &LoggerRef::Log, |
| 22 | pybind11::arg("lvl"), |
| 23 | pybind11::arg("line"), |
| 24 | pybind11::arg("file_name"), |
| 25 | pybind11::arg("function_name"), |
| 26 | pybind11::arg("log_data"), |
| 27 | pybind11::arg("log_data_size")); |
| 28 | } |
| 29 | |
| 30 | } // namespace aimrt::runtime::python_runtime |