From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: Seiji Aguchi <seiji.aguchi@hds.com>,
Frank Schreuder <fschreuder@transip.nl>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: [Qemu-devel] [PULL 1/8] error: only prepend timestamp on stderr
Date: Fri, 18 Sep 2015 15:22:47 +0200 [thread overview]
Message-ID: <1442582574-14275-2-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1442582574-14275-1-git-send-email-armbru@redhat.com>
From: Stefan Hajnoczi <stefanha@redhat.com>
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 <armbru@redhat.com>
Cc: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: Frank Schreuder <fschreuder@transip.nl>
Cc: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <1439212541-16997-1-git-send-email-stefanha@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Tested-by: Frank Schreuder <fschreuder@transip.nl>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
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);
--
2.4.3
next prev parent reply other threads:[~2015-09-18 13:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-18 13:22 [Qemu-devel] [PULL 0/8] Error reporting patches Markus Armbruster
2015-09-18 13:22 ` Markus Armbruster [this message]
2015-09-18 13:22 ` [Qemu-devel] [PULL 2/8] hmp: Allow for error message hints on HMP Markus Armbruster
2015-09-22 15:23 ` Kevin Wolf
2015-09-22 17:02 ` Eric Blake
2015-09-22 23:02 ` [Qemu-devel] [Qemu-block] " John Snow
2015-09-18 13:22 ` [Qemu-devel] [PULL 3/8] error: Copy location information in error_copy() Markus Armbruster
2015-09-18 13:22 ` [Qemu-devel] [PULL 4/8] MAINTAINERS: Add "Error reporting" entry Markus Armbruster
2015-09-18 13:22 ` [Qemu-devel] [PULL 5/8] error: New error_fatal Markus Armbruster
2015-09-18 13:22 ` [Qemu-devel] [PULL 6/8] Fix bad error handling after memory_region_init_ram() Markus Armbruster
2015-09-18 13:22 ` [Qemu-devel] [PULL 7/8] loader: Fix memory_region_init_resizeable_ram() error handling Markus Armbruster
2015-09-18 13:22 ` [Qemu-devel] [PULL 8/8] memory: Fix bad error handling in memory_region_init_ram_ptr() Markus Armbruster
2015-09-18 15:57 ` [Qemu-devel] [PULL 0/8] Error reporting patches Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1442582574-14275-2-git-send-email-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=fschreuder@transip.nl \
--cc=qemu-devel@nongnu.org \
--cc=seiji.aguchi@hds.com \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).