From: Cole Robinson <[email protected]> monitor_printf will drop the requested output if cur_mon is qmp (for good reason). However these messages are often helpful for debugging issues with via libvirt.
If we know the message won't hit the monitor, send it to stderr. Cc: Luiz Capitulino <[email protected]> Cc: Markus Armbruster <[email protected]> Signed-off-by: Cole Robinson <[email protected]> Reviewed-by: Paolo Bonzini <[email protected]> Signed-off-by: Luiz Capitulino <[email protected]> --- util/qemu-error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/qemu-error.c b/util/qemu-error.c index 80df49a..7b167fd 100644 --- a/util/qemu-error.c +++ b/util/qemu-error.c @@ -20,7 +20,7 @@ */ void error_vprintf(const char *fmt, va_list ap) { - if (cur_mon) { + if (cur_mon && !monitor_cur_is_qmp()) { monitor_vprintf(cur_mon, fmt, ap); } else { vfprintf(stderr, fmt, ap); -- 1.9.0
