Move back to C

I'm insane and as such I have moved to C AGAIN! Without any reason.
This commit is contained in:
Piotr Krygier committed 2023-08-14 13:48:29 +02:00
1 parent bf31b96a2e
commit 3d538eaa2c
43 files changed
+2645 -2649

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
#include "logger.h"
#include "stdarg.h"
const char* log_levels[] = {
"LOGLEVEL_TRACE", "LOGLEVEL_DEBUG", "LOGLEVEL_INFO", "LOGLEVEL_WARNING", "LOGLEVEL_ERROR", "LOGLEVEL_FATAL"
};
void _log_log(unsigned int level, const char* file, int line, const char* fmt, ...)
{
char buf[256];
va_list list;
va_start(list, fmt);
fprintf(stdout, "%s %s:%d ", log_levels[level], file, line);
vfprintf(stdout, fmt, list);
fprintf(stdout, "\n");
fflush(stdout);
}