mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
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>
This commit is contained in:
parent
1ae4ca0463
commit
ab81002252
6 changed files with 80 additions and 0 deletions
|
@ -62,6 +62,7 @@ _qemu_api_rs = static_library(
|
|||
'src/errno.rs',
|
||||
'src/error.rs',
|
||||
'src/irq.rs',
|
||||
'src/log.rs',
|
||||
'src/memory.rs',
|
||||
'src/module.rs',
|
||||
'src/prelude.rs',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue