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 || 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