Replace printf with DEBUG_ macros in simple_test.c, test_packet_dump.c, test_intensive_memory_pool.c

This commit is contained in:
Evgeny committed 2026-01-26 18:25:48 +03:00
1 parent a90b3038ac
commit 0d75546ff0
3 files changed
+35 -22

No files matched your search

+7 -3
View File
@@ -11,12 +11,16 @@ void test_packet_dump() {
snprintf(hex_buf, sizeof(hex_buf), "%02x%02x%02x%02x%02x%02x",
test_data[0], test_data[1], test_data[2], test_data[3], test_data[4], test_data[5]);
printf("[ETCP] TEST_SEND: len=%zu hex=%s\n", sizeof(test_data), hex_buf);
printf("[ETCP] TEST_COMPACT: link=NULL type=0x%02x ts=0 len=%zu\n", test_data[0], sizeof(test_data));
DEBUG_INFO(DEBUG_CATEGORY_ETCP, "TEST_SEND: len=%zu hex=%s", sizeof(test_data), hex_buf);
DEBUG_INFO(DEBUG_CATEGORY_ETCP, "TEST_COMPACT: link=NULL type=0x%02x ts=0 len=%zu", test_data[0], sizeof(test_data));
}
int main() {
printf("=== Testing single-line packet dump ===\n");
debug_config_init();
debug_set_level(DEBUG_LEVEL_TRACE);
debug_set_categories(DEBUG_CATEGORY_ALL);
DEBUG_INFO(DEBUG_CATEGORY_ETCP, "=== Testing single-line packet dump ===");
test_packet_dump();
return 0;
}