LogTrace(LPCTSTR pszFormat, ...)
{
va_list pArgs;
char szMessageBuffer[16380]={0};
va_start( pArgs, pszFormat );
_vsntprintf( szMessageBuffer, 16380, pszFormat, pArgs );
va_end( pArgs );
OutputDebugString(szMessageBuffer);
}
调用:
LogTrace("test:%d,%s,%f\n",1,"1234",0.1);
输出:
test:1,1234,0.100000