refactor: 重构日志系统,统一日志接口并添加map工具

This commit is contained in:
2025-10-17 14:55:41 +08:00
parent 9fce78a59e
commit c5c625f50e
10 changed files with 284 additions and 195 deletions

17
tests/test-map.c Normal file
View File

@@ -0,0 +1,17 @@
#include "utils/logging-map.h"
int main(int argc, char *argv[]) {
(void)argc;
(void)argv;
Map *map = map_create(0, sizeof(int));
const char *keys[] = {"key1", "key2", "key3", "key4", "key5"};
for (int i = 0; i < 5; i++) {
map_put(map, keys[i], &i);
}
map_destroy(map);
return 0;
}