From 1ffaf428967f3db81eed01b7183c6f0a9f864a02 Mon Sep 17 00:00:00 2001 From: Sani7 Date: Sat, 4 Nov 2023 12:39:22 +0100 Subject: [PATCH] fix logger defines --- project/Core/Inc/log.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/project/Core/Inc/log.h b/project/Core/Inc/log.h index 66802f5..df8e87f 100644 --- a/project/Core/Inc/log.h +++ b/project/Core/Inc/log.h @@ -88,27 +88,27 @@ #endif #if LOGGER_LEVEL <= 1 -#define LOG_DEBUG(tag, fmt, ...) printf(LOG_Color_D"[Debug] (%lu) [%s]: "fmt LOG_RESET_COLOR, logger_get_timestamp(), tag, ##__VA_ARGS__) +#define LOG_DEBUG(tag, fmt, ...) printf(LOG_COLOR_D"[Debug] (%lu) [%s]: " fmt LOG_RESET_COLOR, logger_get_timestamp(), tag, ##__VA_ARGS__) #else #define LOG_DEBUG(tag, fmt, ...) #endif #if LOGGER_LEVEL <= 2 -#define LOG_INFO(tag, fmt, ...) printf(LOG_COLOR_I"[Info] (%lu) [%s]: "fmt LOG_RESET_COLOR, logger_get_timestamp(), tag, ##__VA_ARGS__) +#define LOG_INFO(tag, fmt, ...) printf(LOG_COLOR_I"[Info] (%lu) [%s]: " fmt LOG_RESET_COLOR, logger_get_timestamp(), tag, ##__VA_ARGS__) #else #define LOG_INFO(tag, fmt, ...) #endif #if LOGGER_LEVEL <= 3 -#define LOG_WARN(tag, fmt, ...) printf(LOG_COLOR_W"[Warning] (%lu) [%s]: "fmt LOG_RESET_COLOR, logger_get_timestamp(), tag, ##__VA_ARGS__) +#define LOG_WARN(tag, fmt, ...) printf(LOG_COLOR_W"[Warning] (%lu) [%s]: " fmt LOG_RESET_COLOR, logger_get_timestamp(), tag, ##__VA_ARGS__) #else #define LOG_WARN(tag, fmt, ...) #endif #if LOGGER_LEVEL <= 4 -#define LOG_CRIT(tag, fmt, ...) printf(LOG_COLOR_C"[Critical] (%lu) [%s]: "fmt LOG_RESET_COLOR, logger_get_timestamp(), tag, ##__VA_ARGS__) +#define LOG_CRIT(tag, fmt, ...) printf(LOG_COLOR_C"[Critical] (%lu) [%s]: " fmt LOG_RESET_COLOR, logger_get_timestamp(), tag, ##__VA_ARGS__) #else #define LOG_CRIT(tag, fmt, ...) #endif #if LOGGER_LEVEL <= 4 -#define LOG_FATAL(tag, fmt, ...) printf(LOG_COLOR_F"[Fatal] (%lu) [%s]: "fmt LOG_RESET_COLOR, logger_get_timestamp(), tag, ##__VA_ARGS__) +#define LOG_FATAL(tag, fmt, ...) printf(LOG_COLOR_F"[Fatal] (%lu) [%s]: " fmt LOG_RESET_COLOR, logger_get_timestamp(), tag, ##__VA_ARGS__) #else #define LOG_FATAL(tag, fmt, ...) #endif