On Wed, Jun 11, 2025 at 12:57 PM Manos Pitsidianakis <manos.pitsidiana...@linaro.org> wrote:
> Maybe we could take this chance to remove the requirement for trailing > newline? Not urgent, and also something we could change afterwards > anyway. We could also introduce log_mask_ln! macro but now I'm just > bikeshedding. Good idea; there is no "formatln!" but I think you could use concat instead. If that doesn't work for whatever reason we can indeed add it later. I had the idea of a struct that wraps the logging functions qemu_log_trylock() and qemu_log_unlock() and implements io::Write; at which point, implementing log_mask_ln! (or _nl! following the unstable format_args_nl!) with writeln! would be trivial. > Besides that, I think it'd be useful to have the macro re-exported in > rust/qemu-api/src/prelude.rs as well. Please add it for the next > version. Yes, I agree. Paolo