ftech
/Logger
/amendments
/4
Log to NONE if the log file cannot be created.
Francois Techene made amendment 4 10 days ago
--- logger.c Tue Apr 8 09:29:25 2025
+++ logger.c Tue Apr 8 14:38:34 2025
@@ -48,10 +48,13 @@ init_logger(LogLevel level,
logger.log = log_to_file;
- // Empty log file
+ // Empty log file. If the file cannot be created, the log output
+ // is set to NONE_OUT;
//
file = fopen(logger.file_path, "w");
if(!file) {
+ logger.output_method = NONE_OUT;
+ logger.log = log_to_none;
return;
}
fprintf(file, "");