static const char * const debug_classes[] =
{"SEVR", "WARN", "INFO", "CONF", "FINE", "TRCE"};
+static const char const debug_classes_acronym[] =
+ {'S', 'W', 'I', 'C', 'F', 'T'};
#define MAX_DEBUG_OPTIONS 256
}
int dbg_log(enum _debug_class cls, struct _debug_channel *channel,
- const char *format, ...)
+ int line, const char *format, ...)
{
int ret = 0;
int ret_write = 0;
}
ret += get_timeofday(buf_msg, sizeof(buf_msg));
- ret += g_snprintf(buf_msg + ret, sizeof(buf_msg) - ret, "(%5d) [%4s:%10s] ",
- qemu_get_thread_id(), debug_classes[cls], channel->name);
+ ret += g_snprintf(buf_msg + ret, sizeof(buf_msg) - ret, "|%5d|%1c|%10s|%4d|",
+ qemu_get_thread_id(), debug_classes_acronym[cls], channel->name, line);
va_start(valist, format);
ret += g_vsnprintf(buf_msg + ret, sizeof(buf_msg) - ret, format, valist);
_DBG_LOG
#define _DBG_LOG(args...) \
- dbg_log(__dbcl, (struct _debug_channel *)(__dbch), args); } }while(0)
+ dbg_log(__dbcl, (struct _debug_channel *)(__dbch), __LINE__, args); } }while(0)
extern unsigned char _dbg_get_channel_flags(struct _debug_channel *channel);
extern int dbg_log(enum _debug_class cls, struct _debug_channel *ch,
- const char *format, ...);
+ int line, const char *format, ...);
#ifndef LOG_SEVERE
#define LOG_SEVERE __DPRINTF(_SEVERE,&_dbch_)