error: Revert unwanted change of warning messages
authorMarkus Armbruster <armbru@redhat.com>
Wed, 19 Jul 2017 07:33:34 +0000 (09:33 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 24 Jul 2017 12:16:29 +0000 (14:16 +0200)
Commit 97f4030 changed warning messages from

    timestamp-if-enabled progname ":" location "warning: " message

to

    "warning: " timestamp-if-enabled progname ":" location message

This regressed qemu-iotests 051.  Put "warning: " right back where it
was, along with "info: ".

Reported-by: Kevin Wolf <kwolf@redhat.com>
Cc: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1500449614-16811-1-git-send-email-armbru@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
util/qemu-error.c

index c557c6ae47f18bede08d03695a6daab67a4f65aa..a25d3b94c64d6a769ee42ac3a67caacecfbcfc0b 100644 (file)
@@ -201,6 +201,15 @@ static void vreport(report_type type, const char *fmt, va_list ap)
     GTimeVal tv;
     gchar *timestr;
 
+    if (enable_timestamp_msg && !cur_mon) {
+        g_get_current_time(&tv);
+        timestr = g_time_val_to_iso8601(&tv);
+        error_printf("%s ", timestr);
+        g_free(timestr);
+    }
+
+    print_loc();
+
     switch (type) {
     case REPORT_TYPE_ERROR:
         break;
@@ -212,14 +221,6 @@ static void vreport(report_type type, const char *fmt, va_list ap)
         break;
     }
 
-    if (enable_timestamp_msg && !cur_mon) {
-        g_get_current_time(&tv);
-        timestr = g_time_val_to_iso8601(&tv);
-        error_printf("%s ", timestr);
-        g_free(timestr);
-    }
-
-    print_loc();
     error_vprintf(fmt, ap);
     error_printf("\n");
 }