Revision 5e2ac519 util/qemu-error.c
b/util/qemu-error.c | ||
---|---|---|
196 | 196 |
} |
197 | 197 |
} |
198 | 198 |
|
199 |
bool enable_timestamp_msg; |
|
199 | 200 |
/* |
200 | 201 |
* Print an error message to current monitor if we have one, else to stderr. |
201 | 202 |
* Format arguments like sprintf(). The result should not contain |
... | ... | |
206 | 207 |
void error_report(const char *fmt, ...) |
207 | 208 |
{ |
208 | 209 |
va_list ap; |
210 |
GTimeVal tv; |
|
211 |
gchar *timestr; |
|
212 |
|
|
213 |
if (enable_timestamp_msg) { |
|
214 |
g_get_current_time(&tv); |
|
215 |
timestr = g_time_val_to_iso8601(&tv); |
|
216 |
error_printf("%s ", timestr); |
|
217 |
g_free(timestr); |
|
218 |
} |
|
209 | 219 |
|
210 | 220 |
error_print_loc(); |
211 | 221 |
va_start(ap, fmt); |
Also available in: Unified diff