feat: add log levels to logger

Replace log_message with log_debug/info/warn/err and a level filter
controlled by logger_set_level. Extract the printf sink into
log_write so CMock can intercept it in test_logger. Add 9 tests
covering emit and suppression behaviour per level.
This commit is contained in:
2026-05-09 20:43:32 +02:00
parent bee8424782
commit 701c644408
12 changed files with 128 additions and 15 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ int main([[maybe_unused]]int argc, [[maybe_unused]]char const* argv[]) {
char upper[32];
str_upper(upper, "hello, tdd", sizeof(upper));
log_message(upper);
log_info(upper);
return 0;
}