From a2ca46ab6712549496afe1c002a747ba29042e89 Mon Sep 17 00:00:00 2001 From: Jing Chen Date: Thu, 29 Apr 2010 08:47:45 +1000 Subject: [PATCH] put the init log file under log folder r2894 | jgn | 2010-04-29 08:47:45 +1000 (Thu, 29 Apr 2010) | 2 lines --- servlog.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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)