diff options
| author | Bernhard Beschow <shentey@gmail.com> | 2025-06-15 13:20:34 +0200 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-06-20 13:25:59 +0200 |
| commit | ab81002252af101068fca94bc82b31ba59ff154b (patch) | |
| tree | 6b4d3837e312bc5406d058dc17f160d886bc8a76 /rust/qemu-api/src/prelude.rs | |
| parent | 1ae4ca0463d737ead1162c35b267ef5882d42883 (diff) | |
| download | focaccia-qemu-ab81002252af101068fca94bc82b31ba59ff154b.tar.gz focaccia-qemu-ab81002252af101068fca94bc82b31ba59ff154b.zip | |
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 <shentey@gmail.com> Link: https://lore.kernel.org/r/20250615112037.11992-2-shentey@gmail.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to '')
| -rw-r--r-- | rust/qemu-api/src/prelude.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rust/qemu-api/src/prelude.rs b/rust/qemu-api/src/prelude.rs index 43bfcd5fca..8f9e23ee2c 100644 --- a/rust/qemu-api/src/prelude.rs +++ b/rust/qemu-api/src/prelude.rs @@ -11,6 +11,8 @@ pub use crate::cell::BqlRefCell; pub use crate::errno; +pub use crate::log_mask_ln; + pub use crate::qdev::DeviceMethods; pub use crate::qom::InterfaceType; |