From aaeec50687a551b64a2cda4a32b0adce08edde1a Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Sat, 4 Feb 2023 18:23:10 +0100 Subject: [PATCH] removed TODO from why2_write_log's write --- src/logger/lib/logger.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/logger/lib/logger.c b/src/logger/lib/logger.c index 837c93c..3034995 100644 --- a/src/logger/lib/logger.c +++ b/src/logger/lib/logger.c @@ -154,7 +154,10 @@ void why2_write_log(int loggerFile, char *logMessage) sprintf(buffer, WHY2_WRITE_FORMATTING, tm.tm_hour, tm.tm_min, tm.tm_sec, message); //LOAD MESSAGE - (void) (write(loggerFile, buffer, strlen(buffer)) + 1); //TODO: Try to create some function for processing exit value + if (write(loggerFile, buffer, strlen(buffer)) != (ssize_t) strlen(buffer)) + { + if (!why2_get_flags().no_output) fprintf(stderr, "Writing failed!"); + } //DEALLOCATION why2_free(buffer);