create project structure

This commit is contained in:
2024-11-23 18:47:32 +03:00
parent 75f3e942e6
commit 15c07a898b
13 changed files with 221 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
#include <stdio.h>
#include <time.h>
#include "log_text.h"
void log_text(const char* msg, LogLevel level, const char* path) {
FILE* f = fopen(path, "a");
if (!f) return;
time_t t = time(NULL);
struct tm* tm_info = localtime(&t);
// Format log entry
fprintf(f, "%ld %d example-app %s\n", t, level, msg);
fclose(f);
}