Add log framework

This commit is contained in:
2026-04-24 15:14:15 +02:00
parent 78899f32a6
commit 0e826e05e1
5 changed files with 62 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
#include "log.h"
#include <stdio.h>
static LogError* s_logError = NULL;
void log_set_output(LogError* destination) {
s_logError = destination;
}
void log_error(const char* msg) {
if (s_logError != NULL) {
s_logError(msg);
} else {
fprintf(stderr, "Error: %s\n", msg);
}
}