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:
+3
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user