put the init log file under log folder

r2894 | jgn | 2010-04-29 08:47:45 +1000 (Thu, 29 Apr 2010) | 2 lines
This commit is contained in:
Jing Chen
2010-04-29 08:47:45 +10:00
committed by Douglas Clowes
parent d8e391ea90
commit a2ca46ab67

View File

@@ -251,6 +251,7 @@ static const char* timestamp(struct timeval *tp) {
static int iFile = 0;
static int iLineCount = 0;
static int iLogUsable = 1;
char * fPath = "./../log/";
/*---------------------------------------------------------------------------*/
int OpenVerifyLogFile()
@@ -284,9 +285,9 @@ static const char* timestamp(struct timeval *tp) {
mon = time->tm_mon;
year = time->tm_year + 1900;
snprintf(filnam,511,"%s%2.2d_%02d:%02d:%02d-%02d%02d%04d.log",pFile, iFile, hh, mm, ss, day, mon, year);
snprintf(filnam,511,"%s%s%2.2d_%02d:%02d:%02d-%02d%02d%04d.log", fPath, pFile, iFile, hh, mm, ss, day, mon, year);
}else
snprintf(filnam,511,"%s%2.2d.log",pFile, iFile);
snprintf(filnam,511,"%s%s%2.2d.log", fPath, pFile, iFile);
fLogFile = fopen(filnam,"w");
if(!fLogFile)