From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WR95L-0000SB-3V for qemu-devel@nongnu.org; Fri, 21 Mar 2014 19:42:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WR95E-0002PG-Ra for qemu-devel@nongnu.org; Fri, 21 Mar 2014 19:42:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24508) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WR95E-0002P1-JF for qemu-devel@nongnu.org; Fri, 21 Mar 2014 19:42:40 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s2LNgeTT011413 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 21 Mar 2014 19:42:40 -0400 From: Cole Robinson Date: Fri, 21 Mar 2014 19:42:24 -0400 Message-Id: <5f40f260d4b0f7a3e6b8f56a070327e4f67aa2fd.1395445063.git.crobinso@redhat.com> In-Reply-To: References: In-Reply-To: References: Subject: [Qemu-devel] [PATCH v2 5/9] error: Print error_report() to stderr if using qmp List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Luiz Capitulino , Markus Armbruster , Cole Robinson 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 Cc: Markus Armbruster Signed-off-by: Cole Robinson --- 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.8.5.3