feat: 统一命名

This commit is contained in:
2025-11-03 16:39:27 +08:00
parent 7e9d761251
commit 5b218d5f9d
8 changed files with 62 additions and 61 deletions

View File

@@ -20,7 +20,7 @@ int main() {
loggingHandlerFile("test_interceptor", 1024 * 1024),
false);
addFilter(getDefaultLogger(), tint);
loggingAddFilter(loggingGetDefaultLogger(), tint);
char *test2[] = {"123", NULL};
@@ -30,7 +30,7 @@ int main() {
loggingHandlerFile("test_interceptor1", 1024 * 1024),
true);
addFilter(getDefaultLogger(), tint1);
loggingAddFilter(loggingGetDefaultLogger(), tint1);
printf("\n");
printf("filter added\n");
@@ -42,6 +42,6 @@ int main() {
Log_debug("This is a debug message");
Log_warning("This is a warning message%s", "123");
destroyDefaultLogger();
loggingDestroyAll();
return 0;
}

View File

@@ -3,7 +3,7 @@
int main() {
log_Handler *hander = loggingHandlerFile("test_log", 1024 * 1024 * 10);
addHandler(getDefaultLogger(), hander);
loggingAddHandler(loggingGetDefaultLogger(), hander);
Log_info("This is an info message");
Log_error("This is an error message%s", "123");
@@ -11,6 +11,6 @@ int main() {
Log_debug("This is a debug message");
Log_warning("This is a warning message%s", "123");
destroyDefaultLogger();
loggingDestroyAll();
return 0;
}

View File

@@ -3,13 +3,13 @@
#include <stdio.h>
int main() {
Logger *t1 = getLogger("Test1");
Logger *t1 = loggingGetLogger("Test1");
t1->level = LOG_ERROR;
Logger *t2 = getLogger("Test2");
Logger *t2 = loggingGetLogger("Test2");
t2->level = LOG_DEBUG;
Logger *t11 = getLogger("Test1");
Logger *t11 = loggingGetLogger("Test1");
if (t1 == t11) {
printf("t1 and t11 are the same\n");
@@ -19,6 +19,6 @@ int main() {
return 1;
}
destroyDefaultLogger();
loggingDestroyAll();
return 0;
}

View File

@@ -7,6 +7,6 @@ int main() {
Log_debug("This is a debug message");
Log_warning("This is a warning message%s", "123");
destroyDefaultLogger();
loggingDestroyAll();
return 0;
}