diff --git a/include/logger/flags.h b/include/logger/flags.h index 1991372..7abd005 100644 --- a/include/logger/flags.h +++ b/include/logger/flags.h @@ -35,7 +35,7 @@ const enum RETURN_CODES //exit codes you fucking idiot (2#) #define LOG_FORMATTING "%s/%s_%03x.log" //SAME THING AS LOG_FORMAT, BUT USED IN sprintf IN logger.c, NOT AS LENGTH #define LOG_FORMATTING_START "%04d-%02d-%02d" //FIRST PART OF LOG_FORMATTING -#define WRITE_FORMAT "[hh:mm:ss] " //LOG MESSAGE'S PREFIX (THE SPACE AT THE END IS INTENTIONAL) +#define WRITE_FORMAT "[hh:mm:ss]: " //LOG MESSAGE'S PREFIX (THE SPACE AT THE END IS INTENTIONAL) #define WRITE_FORMATTING "[%02d:%02d:%02d]: %s\n" //guess what #define LOG_LATEST_FORMATTING "%s/%s" diff --git a/src/logger/lib/logger.c b/src/logger/lib/logger.c index cefcc4b..82fa14a 100644 --- a/src/logger/lib/logger.c +++ b/src/logger/lib/logger.c @@ -139,7 +139,7 @@ void writeLog(int loggerFile, char *logMessage) message = logMessageUsed; } - buffer = malloc(strlen(WRITE_FORMAT) + strlen(message) + 3); //ALLOCATE + buffer = malloc(strlen(WRITE_FORMAT) + strlen(message) + 2); //ALLOCATE sprintf(buffer, WRITE_FORMATTING, tm.tm_hour, tm.tm_min, tm.tm_sec, message); //LOAD MESSAGE