From 199620251545822c76c02a69fffcb93bf76b8fe7 Mon Sep 17 00:00:00 2001 From: Undici77 Date: Tue, 18 Nov 2025 10:44:05 +0100 Subject: [PATCH 1/2] style(logger): add weak attribute to logger format function The `__weak` attribute was added to the `__logger_log` function to allow for weak symbol resolution in linking scenarios. --- src/logger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/logger.c b/src/logger.c index 8152ba4..4335177 100644 --- a/src/logger.c +++ b/src/logger.c @@ -95,7 +95,7 @@ static int terminate_log_line(char *buf, int len) #define LOG_BUF_LEN 192 -__format_printf(5, 6) +__weak __format_printf(5, 6) int __logger_log(logger_t *ctx, int log_level, const char *file, unsigned long line, const char *fmt, ...) { @@ -111,7 +111,7 @@ int __logger_log(logger_t *ctx, int log_level, const char *file, unsigned long l { file = filename + 1; } - + if (!ctx->cb) { if (log_level < LOG_EMERG || log_level >= LOG_MAX_LEVEL || From b8e1510822db3cee0f60406d6043f22385a63632 Mon Sep 17 00:00:00 2001 From: "andrea.marinelli" Date: Fri, 3 Apr 2026 12:36:06 +0200 Subject: [PATCH 2/2] esp platform change --- src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.c b/src/utils.c index 367d79a..4951954 100644 --- a/src/utils.c +++ b/src/utils.c @@ -131,7 +131,7 @@ int add_iso8601_utc_datetime(char* buf, size_t size) return r; } -#elif defined(__linux__) || defined(__APPLE__) +#elif defined(__linux__) || defined(__APPLE__) || defined(ESP_PLATFORM) #include #include