char szErrorInfo[MAX_LOG_LEN] = {0x00};
#ifdef _DEBUG
FILE *m_fp == NULL;
char *m_log = "./log.txt";
#endif
void GetBuildTime(char *strTime)
{
time_t rawtime;
struct tm *info = NULL;
time(&rawtime);
info = localtime(&rawtime);
sprintf(strTime,"%d/%d/%d %d:%d:%d",info->tm_year+1900,info->tm_mon+1,info->tm_mday,info->tm_hour,info->tm_min,info->tm_sec);
}
int LogPrint(const char *format, ...)
{
va_list arguments;
char sprint_buf[MAX_LOG_LEN] = {0x00};
char szTime[MAX_TIME_LEN] = {0x00};
memset(sprint_buf,0x00,MAX_LOG_LEN);
GetBuildTime(szTime);
va_start(arguments, format);
vsprintf(sprint_buf,format,arguments);
va_end(arguments);
if(strlen(szErrorInfo) >= MAX_LOG_LEN/2){
<