--- deliantra/server/common/logger.c 2006/02/03 07:11:36 1.1.1.1 +++ deliantra/server/common/logger.c 2006/08/13 17:16:00 1.3 @@ -46,6 +46,12 @@ * than any other buffer, since that buffer may * need to be put in this one. */ + char tbuf[20480]; + + time_t curtime = time (NULL); + struct tm *ptime = localtime (&curtime); + + strftime (tbuf, 256, "%Y-%m-%d %H:%M:%S ", ptime); va_list ap; va_start(ap, format); @@ -54,15 +60,16 @@ if (logLevel <= settings.debug) { vsprintf(buf, format, ap); + strncat(tbuf, buf, 20460); #ifdef WIN32 /* ---win32 change log handling for win32 */ - fputs(buf, logfile); /* wrote to file or stdout */ + fputs(tbuf, logfile); /* wrote to file or stdout */ #ifdef DEBUG /* if we have a debug version, we want see ALL output */ fflush(logfile); /* so flush this! */ #endif if(logfile != stderr) /* if was it a logfile wrote it to screen too */ - fputs(buf, stderr); + fputs(tbuf, stderr); #else - fputs(buf, logfile); + fputs(tbuf, logfile); #endif } if (!exiting && !trying_emergency_save &&