qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v6] add timestamp to error_report()


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v6] add timestamp to error_report()
Date: Thu, 4 Jul 2013 10:58:45 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

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 <address@hidden>
> ---
> 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 <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]