diff options
Diffstat (limited to 'src/Mayaqua/Kernel.c')
-rw-r--r-- | src/Mayaqua/Kernel.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/Mayaqua/Kernel.c b/src/Mayaqua/Kernel.c index 2edc142e..47bce23d 100644 --- a/src/Mayaqua/Kernel.c +++ b/src/Mayaqua/Kernel.c @@ -2401,10 +2401,34 @@ void AbortExitEx(char *msg) msg = "Unknown Error";
}
- f = fopen("abort_error_log.txt", "w");
+ f = fopen("abort_error_log.txt", "a");
if (f != NULL)
{
+ SYSTEMTIME time = CLEAN;
+ char time_str[128] = CLEAN;
+ char* crlf = "\r\n";
+ char* tag = "---------";
+
+ LocalTime(&time);
+
+ sprintf(time_str, "%04u-%02u-%02u %02u:%02u:%02u",
+ time.wYear, time.wMonth, time.wDay,
+ time.wHour, time.wMinute, time.wSecond);
+
+ fwrite(tag, 1, strlen(tag), f);
+
+ fwrite(crlf, 1, strlen(crlf), f);
+
+ fwrite(time_str, 1, strlen(time_str), f);
+
+ fwrite(crlf, 1, strlen(crlf), f);
+
fwrite(msg, 1, strlen(msg), f);
+
+ fwrite(crlf, 1, strlen(crlf), f);
+
+ fwrite(crlf, 1, strlen(crlf), f);
+
fclose(f);
}
|