From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOpKN-0006cP-Ug for qemu-devel@nongnu.org; Mon, 10 Aug 2015 11:49:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZOpKK-0002ps-JE for qemu-devel@nongnu.org; Mon, 10 Aug 2015 11:49:31 -0400 Received: from mail-am1on0115.outbound.protection.outlook.com ([157.56.112.115]:10176 helo=emea01-am1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOpKK-0002nz-9n for qemu-devel@nongnu.org; Mon, 10 Aug 2015 11:49:28 -0400 References: <1439212541-16997-1-git-send-email-stefanha@redhat.com> From: Frank Schreuder Message-ID: <55C8C7EE.8070807@transip.nl> Date: Mon, 10 Aug 2015 17:49:02 +0200 MIME-Version: 1.0 In-Reply-To: <1439212541-16997-1-git-send-email-stefanha@redhat.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] error: only prepend timestamp on stderr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Seiji Aguchi , Markus Armbruster Op 8/10/2015 om 3:15 PM schreef Stefan Hajnoczi: > The -msg timestamp=on option prepends a timestamp to error messages. > This is useful on stderr where it allows users to identify when an error > was raised. > > Timestamps do not make sense on the monitor since error_report() is > called in response to a synchronous monitor command and the user already > knows "when" the command was issued. Additionally, the rest of the > monitor conversation lacks timestamps so the error timestamp cannot be > correlated with other activity. > > Only prepend timestamps on stderr. This fixes libvirt's 'drive_del' > processing, which did not expect a timestamp. Other QEMU monitor > clients are probably equally confused by timestamps on monitor error > messages. > > Cc: Markus Armbruster > Cc: Seiji Aguchi > Cc: Frank Schreuder > Cc: Daniel P. Berrange > Signed-off-by: Stefan Hajnoczi > --- > 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 77ea6c6..c1574bb 100644 > --- a/util/qemu-error.c > +++ b/util/qemu-error.c > @@ -210,7 +210,7 @@ void error_vreport(const char *fmt, va_list ap) > GTimeVal tv; > gchar *timestr; > > - if (enable_timestamp_msg) { > + if (enable_timestamp_msg && !cur_mon) { > g_get_current_time(&tv); > timestr = g_time_val_to_iso8601(&tv); > error_printf("%s ", timestr); Tested-by: Frank Schreuder Regards, Frank