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:
+1
-1
@@ -16,7 +16,7 @@ add_subdirectory(ctdd)
|
||||
add_executable(main main.c)
|
||||
target_include_directories(main PRIVATE .)
|
||||
target_compile_features(main PRIVATE c_std_23)
|
||||
target_link_libraries(main PRIVATE ctdd_str ctdd_report ctdd_logger)
|
||||
target_link_libraries(main PRIVATE ctdd_str ctdd_report ctdd_logger ctdd_log_write)
|
||||
|
||||
# Testing
|
||||
enable_testing()
|
||||
|
||||
Reference in New Issue
Block a user