add timestamp to error_report()

[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>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
Seiji Aguchi 2013-07-03 23:02:46 -04:00 committed by Luiz Capitulino
parent f53cae50f8
commit 5e2ac51917
4 changed files with 49 additions and 0 deletions

View file

@ -14,6 +14,7 @@
#define QEMU_ERROR_H
#include <stdarg.h>
#include <stdbool.h>
#include "qemu/compiler.h"
typedef struct Location {
@ -40,5 +41,6 @@ void error_print_loc(void);
void error_set_progname(const char *argv0);
void error_report(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
const char *error_get_progname(void);
extern bool enable_timestamp_msg;
#endif