This commit is contained in:
cpq committed 2021-04-29 09:50:33 +01:00
1 parent 758572872d
commit 7851930ac3
5 files changed
+28 -4

No files matched your search

+1 -1
View File
@@ -35,7 +35,7 @@ bool mg_log_prefix(int level, const char *file, int line, const char *fname) {
if (level <= max) {
char timebuf[21], buf[50] = "";
time_t t = time(NULL);
struct tm *tm = gmtime(&t);
struct tm tmp, *tm = gmtime_r(&t, &tmp);
int n, tag;
strftime(timebuf, sizeof(timebuf), "%Y-%m-%d %H:%M:%S", tm);
tag = level == LL_ERROR ? 'E' : level == LL_INFO ? 'I' : ' ';