void vdbg_msg(const char *sys, const char *fmt, va_list args) { char str[1024*4]; char *msg; int i, len; char timestr[80]; str_timestamp_format(timestr, sizeof(timestr), FORMAT_SPACE); str_format(str, sizeof(str), "[%s][%s]: ", timestr, sys); len = strlen(str); msg = (char *)str + len; #if defined(CONF_FAMILY_WINDOWS) && !defined(__GNUC__) _vsprintf_p(msg, sizeof(str)-len, fmt, args); #else vsnprintf(msg, sizeof(str)-len, fmt, args); #endif for(i = 0; i < num_loggers; i++) loggers[i](str); }