#ifndef _MY_LOG_
#define _MY_LOG_
#include <stdio.h>
#if TRACEDBG
void PrintMessage( LPSTR lpszFormat, ... )
{
char buf[520];
va_list va;
va_start( va, lpszFormat );
vsprintf( buf, lpszFormat, va );
va_end( va );
strcat( buf, "/r/n" );
TRACE0( buf );
}
#elif FILEDBG
void PrintMessage( LPSTR lpszFormat, ... )
{
FILE* fp;
char aBuffer[MAX_PATH];
va_list va;
va_start( va, lpszFormat );
vsprintf( aBuffer, lpszFormat, va );
va_end( va );
fp = fopen( "d://BSDebug.txt", "a" );
if( fp ){
fprintf( fp, "%s", aBuffer );
fclose( fp );
}
}
#else
void PrintMessage( LPSTR lpszFormat, ... )
{
}
#endif
#endif
log file
最新推荐文章于 2024-08-10 23:26:07 发布