更新一些自述文件

This commit is contained in:
2024-11-24 20:23:37 +08:00
parent 09dd534675
commit 3f5153b110
9 changed files with 75 additions and 5 deletions

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

@@ -0,0 +1,17 @@
#include "logging.h"
#include "logging/logging-handler.h"
int main() {
Logger *logger = newDefaultLogger("testLogger", LOG_DEBUG);
log_Handler *hander = loggingHandlerFile("test_log", 1024 * 1024 * 10);
logger->addHandler(hander);
log_info("This is an info message");
log_error("This is an error message%s", "123");
log_fatal("This is an fatal message");
log_debug("This is a debug message");
log_warning("This is a warning message%s", "123");
destroyDefaultLogger();
return 0;
}