From 650ce0dc3f1d17d05f6e1f87f0be7603a266f46e Mon Sep 17 00:00:00 2001 From: youmetme <103353084+WangZhongDian@users.noreply.github.com> Date: Sun, 3 Nov 2024 11:51:08 +0800 Subject: [PATCH] release v0.2.4 (#10) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * #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 --- .github/workflows/windows_test.yml | 3 ++- CMakeLists.txt | 9 +++++++-- conanfile.py | 2 +- include/logging/logging-interceptor.h | 6 ++++++ 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/windows_test.yml b/.github/workflows/windows_test.yml index ad6fc79..faadb9e 100644 --- a/.github/workflows/windows_test.yml +++ b/.github/workflows/windows_test.yml @@ -2,7 +2,8 @@ name: test on Windows on: push: - branches: ["main"] + branches: ["main","dev"] + pull_request: branches: ["main"] diff --git a/CMakeLists.txt b/CMakeLists.txt index f390aec..299931c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,14 @@ cmake_minimum_required(VERSION 3.28...3.30) -set(CMAKE_EXPORT_COMPILE_COMMANDS yes) - project(logging) +if(MSVC) + add_compile_options("/source-charset:utf-8") + add_compile_options("/execution-charset:utf-8") +endif() + +set(CMAKE_EXPORT_COMPILE_COMMANDS yes) + option(TEST "是否启动单元测试" ON) option(SHARED "是否编译为动态库" OFF) diff --git a/conanfile.py b/conanfile.py index ff498df..d2e2cb5 100644 --- a/conanfile.py +++ b/conanfile.py @@ -5,7 +5,7 @@ import os class loggingRecipe(ConanFile): name = "logging" - version = "0.2.3" + version = "0.2.4" license = "MIT" author = "321640253@qq.com" url = "https://github.com/WangZhongDian/logging.git" diff --git a/include/logging/logging-interceptor.h b/include/logging/logging-interceptor.h index a365027..973fe48 100644 --- a/include/logging/logging-interceptor.h +++ b/include/logging/logging-interceptor.h @@ -12,6 +12,12 @@ typedef struct log_Interceptor { } log_Interceptor; + +/** +* @brief 子字符串拦截器 +* @param +* @return +*/ log_Interceptor *loggingSubStringInterceptor(char *keywords[], int count, log_level level,