diff --git a/src/logger/lib/logger.c b/src/logger/lib/logger.c index 48cc64c..f12dc9c 100644 --- a/src/logger/lib/logger.c +++ b/src/logger/lib/logger.c @@ -77,7 +77,7 @@ why2_log_file why2_init_logger(char *directoryPath) sprintf(filePath, WHY2_LOG_FORMATTING, directoryPath, dateBuffer, buffer); //GENERATE LOG-NAME - file = why2_open(filePath, O_RDWR | O_APPEND | O_CREAT, 0644); //CREATE LOG FILE + file = open(filePath, O_RDWR | O_APPEND | O_CREAT, 0644); //CREATE LOG FILE //CREATE SYMLINK sprintf(latestBuffer, WHY2_LOG_LATEST_FORMATTING, WHY2_WRITE_DIR, WHY2_LOG_LATEST); //GENERATE LATEST.log PATH @@ -90,6 +90,7 @@ why2_log_file why2_init_logger(char *directoryPath) { if (!why2_get_flags().no_output) fprintf(stderr, "Creating symlink failed!\n"); + close(file); why2_clean_memory("logger_logfile_init"); return why2_empty_log_file(); }