* #feat 增强Fatal级别的底色,修改logging类的方法

* 更新版本号

* 加入test脚本

* fix:conanfile

* test action

* 修复错别字

* add test on windows action

* fix test on windows action

* fix action on windows

* fix

* fix 内存分配错误

* fix msvc 不支持中文注释,删除中文注释

* test on windows and test  chinese char

* ersion 0.2.4

* feature:根据文件大小分割日志

* fix:内存泄露

* fix:使用char偏移单位
This commit is contained in:
youmetme
2024-11-20 11:56:47 +08:00
committed by GitHub
parent 650ce0dc3f
commit d0bfc31563
13 changed files with 231 additions and 93 deletions

View File

@@ -2,8 +2,7 @@
#include <stdio.h>
int main() {
Logging *log = newLogging();
Logger *logger = log->getLogger("testLogger", LOG_DEBUG);
Logger *logger = newLogger("testLogger", LOG_DEBUG);
logger->info("This is an info message");
logger->error("This is an error message%s", "123");
@@ -11,10 +10,13 @@ int main() {
logger->debug("This is a debug message");
logger->warning("This is a warning message%s", "123");
char *test1[] = {"123", "tt"};
char *test1[] = {"123", "tt"};
log_Interceptor *tint =
loggingSubStringInterceptor(test1, 2, LOG_DEBUG, loggingFileHandler("test_interceptor"));
log_Interceptor *tint = loggingSubStringInterceptor(
test1,
2,
LOG_DEBUG,
loggingFileHandler("test_interceptor", 1024 * 1024));
logger->addInterceptor(tint);
@@ -28,6 +30,6 @@ int main() {
logger->debug("This is a debug message");
logger->warning("This is a warning message%s", "123");
log->destroyLogging(log);
destroyLogger();
return 0;
}