diff --git a/servlog.c b/servlog.c index 15b4919e..2b4bbf6b 100644 --- a/servlog.c +++ b/servlog.c @@ -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)