From: Stefan Hajnoczi <stefanha@gmail.com>
To: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: kwolf@redhat.com, aliguori@us.ibm.com, mtosatti@redhat.com,
qemu-devel@nongnu.org, armbru@redhat.com,
dle-develop@lists.sourceforge.net, tomoki.sekiyama@hds.com,
pbonzini@redhat.com, lcapitulino@redhat.com, lersek@redhat.com
Subject: Re: [Qemu-devel] [PATCH v6] add timestamp to error_report()
Date: Thu, 4 Jul 2013 10:58:45 +0200 [thread overview]
Message-ID: <20130704085845.GE2945@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <51D4E5D6.6050404@hds.com>
On Wed, Jul 03, 2013 at 11:02:46PM -0400, Seiji Aguchi wrote:
> [Issue]
> When we offer a customer support service and a problem happens
> in a customer's system, we try to understand the problem by
> comparing what the customer reports with message logs of the
> customer's system.
>
> In this case, we often need to know when the problem happens.
>
> But, currently, there is no timestamp in qemu's error messages.
> Therefore, we may not be able to understand the problem based on
> error messages.
>
> [Solution]
> Add a timestamp to qemu's error message logged by
> error_report() with g_time_val_to_iso8601().
>
> Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com>
> ---
> Changelog
> v5 -> v6
> - Remove include/qemu/time.h and utils/qemu-time.c.
> - Fix a syntax and indent of messages in msg option's DEF().
> - Change explanation of the msg option.
>
> v4 -> v5
> - Fix descriptions of msg option.
> - Rename TIME_H to QEMU_TIME_H. (avoiding double inclusion of qemu/time.h)
> - Change argument of qemu_get_timestamp_str to "char *" and "size_t".
> - Confirmed msg option is displayed by query-command-line-options.
>
> v3 -> v4
> - Correct email address of Signed-off-by.
>
> v2 -> v3
> - Use g_time_val_to_iso8601() to get timestamp instead of
> copying libvirt's time-handling functions.
>
> According to discussion below, qemu doesn't need to take care
> if timestamp functions are async-signal safe or not.
>
> http://marc.info/?l=qemu-devel&m=136741841921265&w=2
>
> Also, In the review of v2 patch, strftime() are recommended to
> format string. But it is not a suitable function to handle msec.
>
> Then, simply call g_time_val_to_iso8601().
>
> - Intoroduce a common time-handling function to util/qemu-time.c.
> (Suggested by Daniel P. Berrange)
>
> - Add testing for g_time_val_to_iso8601() to tests/test-time.c.
> The test cases are copied from libvirt's virtimetest.
> (Suggested by Daniel P. Berrange)
>
> v1 -> v2
>
> - add an option, -msg timestamp={on|off}, to enable output message with timestamp
> ---
> include/qemu/error-report.h | 2 ++
> qemu-options.hx | 11 +++++++++++
> util/qemu-error.c | 10 ++++++++++
> vl.c | 26 ++++++++++++++++++++++++++
> 4 files changed, 49 insertions(+), 0 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
next prev parent reply other threads:[~2013-07-04 8:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-04 3:02 [Qemu-devel] [PATCH v6] add timestamp to error_report() Seiji Aguchi
2013-07-04 8:58 ` Stefan Hajnoczi [this message]
2013-07-08 18:17 ` Luiz Capitulino
2013-07-08 18:47 ` Seiji Aguchi
2013-07-08 19:00 ` Luiz Capitulino
2013-07-09 7:42 ` Laszlo Ersek
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=20130704085845.GE2945@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=aliguori@us.ibm.com \
--cc=armbru@redhat.com \
--cc=dle-develop@lists.sourceforge.net \
--cc=kwolf@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=lersek@redhat.com \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=seiji.aguchi@hds.com \
--cc=tomoki.sekiyama@hds.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).