diff --git a/servlog.c b/servlog.c index cb746e69..9901eb0d 100644 --- a/servlog.c +++ b/servlog.c @@ -237,8 +237,8 @@ static const char* timestamp(void) { /*---------------------------------------------------------------------------*/ -#define MAXLOG 10000 -#define MAXFILES 20 +#define MAXLOG 100000 +#define MAXFILES 100 static FILE *fLogFile = NULL; static int iFile = 0; @@ -314,6 +314,7 @@ static const char* timestamp(void) { /* switch file if too many lines */ if(iLineCount >= MAXLOG) { + fprintf(fLogFile,"%s: <<>>\n", timestamp()); fclose(fLogFile); fLogFile = NULL; iFile++; @@ -328,6 +329,8 @@ static const char* timestamp(void) { if(1 == iLogUsable) { + if (iLineCount == 0) + fprintf(fLogFile,"%s: <<>>\n", timestamp()); fprintf(fLogFile,"%s: ", timestamp()); fprintf(fLogFile,"%s", pText); if (pText[text_len - 1] != '\n')