} report_type;
/* Prepend timestamp to messages */
-bool error_with_timestamp;
+bool message_with_timestamp;
+bool error_with_guestname;
+const char *error_guest_name;
int error_printf(const char *fmt, ...)
{
int i;
const char *const *argp;
- if (!cur_mon && progname) {
+ if (!monitor_cur() && progname) {
fprintf(stderr, "%s:", progname);
sep = " ";
}
GTimeVal tv;
gchar *timestr;
- if (error_with_timestamp && !cur_mon) {
+ if (message_with_timestamp && !monitor_cur()) {
g_get_current_time(&tv);
timestr = g_time_val_to_iso8601(&tv);
error_printf("%s ", timestr);
g_free(timestr);
}
+ /* Only prepend guest name if -msg guest-name and -name guest=... are set */
+ if (error_with_guestname && error_guest_name && !monitor_cur()) {
+ error_printf("%s ", error_guest_name);
+ }
+
print_loc();
switch (type) {