logging
This commit is contained in:
@@ -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;
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
#ifndef LOGGING_H
|
||||||
|
#define LOGGING_H
|
||||||
|
#include <stdio.h>
|
||||||
|
FILE *open_log_file(const char *path);
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user