This commit is contained in:
gandc 2025-02-23 01:00:31 +03:00
parent d6bb1809f3
commit bbedbefe62
Signed by: gandc
GPG Key ID: 9F77B03D43C42CB4
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,11 @@
#include "logging.h"
#include <stdio.h>
FILE *open_log_file(const char *path) {
FILE *file = fopen(path, "w");
if (!file) {
fprintf(stderr, "Error: Cannot open log file %s\n", path);
return NULL;
}
return file;
}

View File

@ -0,0 +1,5 @@
#ifndef LOGGING_H
#define LOGGING_H
#include <stdio.h>
FILE *open_log_file(const char *path);
#endif