1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-10 18:23:12 +02:00

Add timestamp in service.log

This commit is contained in:
Bram Matthys
2017-02-17 15:55:22 +01:00
parent 43921b07ac
commit cded56f46a
+3 -1
View File
@@ -1065,7 +1065,9 @@ void win_log(unsigned char *format, ...)
FILE *fd = fopen("service.log", "a");
if (fd)
{
fprintf(fd, "%s\n", buf);
char timebuf[256];
snprintf(timebuf, sizeof(timebuf), "[%s]", myctime(time(NULL)));
fprintf(fd, "%s - %s\n", timebuf, buf);
fclose(fd);
}
#ifdef _DEBUG