diff --git a/src/logger/lib/logger.c b/src/logger/lib/logger.c index a3b6ac2..48cc64c 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 = open(filePath, O_RDWR | O_APPEND | O_CREAT, 0644); //CREATE LOG FILE + file = why2_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 diff --git a/src/logger/lib/utils.c b/src/logger/lib/utils.c index a7bbb18..a088d02 100644 --- a/src/logger/lib/utils.c +++ b/src/logger/lib/utils.c @@ -31,7 +31,7 @@ along with this program. If not, see . void why2_deallocate_logger(why2_log_file logger) { - close(logger.file); + why2_deallocate(&logger.file); why2_deallocate(logger.filename); logger.filename = NULL;