From 34e190b6135ede2fa71c157310932fc96954ed9d Mon Sep 17 00:00:00 2001 From: apple1417 Date: Tue, 2 Jul 2024 18:37:34 +1200 Subject: [PATCH] fix log level specific printers runtime only error, whoops didn't test :/ --- src/pyunrealsdk/logging.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pyunrealsdk/logging.cpp b/src/pyunrealsdk/logging.cpp index 31e235e..71aae30 100644 --- a/src/pyunrealsdk/logging.cpp +++ b/src/pyunrealsdk/logging.cpp @@ -126,8 +126,8 @@ void register_per_log_level_printer(py::module_& logging, logging.def( func_name, [](const py::args& args, const py::kwargs& kwargs) { - kwargs["file"] = logger; - py::print(*args, **kwargs); + py::print(*args, **kwargs, + "file"_a = py::cast(logger, py::return_value_policy::reference)); }, docstring.c_str()); }