add log file functionality

This commit is contained in:
2026-05-19 22:25:09 -05:00
parent 964425e7b8
commit 2ab8477d7d
5 changed files with 56 additions and 16 deletions

View File

@@ -3,6 +3,7 @@
#include "time.h"
#include <stdarg.h>
#include <stdio.h>
#define max_string_len 1024
@@ -42,10 +43,14 @@ typedef struct {
int lLogString_array_append(lLogString_array* array, lLogString* string);
typedef struct {
lLogString logfolder;
FILE* log_file;
timer_array timers;
int historyEnabled;
int logFileEnabled;
lLogString_array history;
} Logger;
Logger* Logger_new(lLogString* logfolder, int history_enabled);
int create_timer(Logger* logger);
void start_timer(Logger* logger, int timer_id);