From ab81002252af101068fca94bc82b31ba59ff154b Mon Sep 17 00:00:00 2001 From: Bernhard Beschow Date: Sun, 15 Jun 2025 13:20:34 +0200 Subject: rust/qemu-api: Add initial logging support based on C API A log_mask_ln!() macro is provided which expects similar arguments as the C version. However, the formatting works as one would expect from Rust. To maximize code reuse the macro is just a thin wrapper around qemu_log(). Also, just the bare minimum of logging masks is provided which should suffice for the current use case of Rust in QEMU. Signed-off-by: Bernhard Beschow Link: https://lore.kernel.org/r/20250615112037.11992-2-shentey@gmail.com Signed-off-by: Paolo Bonzini --- rust/qemu-api/wrapper.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'rust/qemu-api/wrapper.h') diff --git a/rust/qemu-api/wrapper.h b/rust/qemu-api/wrapper.h index 6060d3ba1a..15a1b19847 100644 --- a/rust/qemu-api/wrapper.h +++ b/rust/qemu-api/wrapper.h @@ -48,6 +48,8 @@ typedef enum memory_order { #endif /* __CLANG_STDATOMIC_H */ #include "qemu/osdep.h" +#include "qemu/log.h" +#include "qemu/log-for-trace.h" #include "qemu/module.h" #include "qemu-io.h" #include "system/system.h" -- cgit 1.4.1