From 49f1278ffd6e636aec57002d6431d1144827ebdf Mon Sep 17 00:00:00 2001 From: IronsDu Date: Thu, 9 Apr 2026 09:10:24 +0800 Subject: [PATCH] chore: remove unused logger.h header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit logger.h was an empty forwarding header — logging configuration is now handled via ProfilerManager instance methods (setLogSink/setLogLevel). No code referenced this header. Co-Authored-By: Claude Opus 4.6 --- CMakeLists.txt | 2 -- README.md | 3 +-- docs/user_guide/06_using_find_package.md | 1 - include/profiler/logger.h | 18 ------------------ plan.md | 3 +-- 5 files changed, 2 insertions(+), 25 deletions(-) delete mode 100644 include/profiler/logger.h diff --git a/CMakeLists.txt b/CMakeLists.txt index ffcbb52..7884c8d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,7 +113,6 @@ set(PROFILER_CORE_SOURCES set(PROFILER_CORE_HEADERS include/profiler_manager.h include/profiler/log_sink.h - include/profiler/logger.h include/profiler/http_handlers.h ) @@ -286,7 +285,6 @@ if(REMOTE_PROFILER_INSTALL) # Install profiler subdirectory headers install(FILES include/profiler/log_sink.h - include/profiler/logger.h include/profiler/http_handlers.h DESTINATION include/cpp-remote-profiler/profiler ) diff --git a/README.md b/README.md index b502bdc..4fb0e4f 100644 --- a/README.md +++ b/README.md @@ -326,8 +326,7 @@ cpp-remote-profiler/ │ └── profiler/ │ ├── http_handlers.h # 框架无关的 HTTP 处理器 │ ├── drogon_adapter.h # Drogon 适配层(可选) -│ ├── log_sink.h # 日志 Sink 接口 -│ └── logger.h # 日志配置接口 +│ └── log_sink.h # 日志 Sink 接口 ├── src/ │ ├── profiler_manager.cpp # Profiler 管理器实现 │ ├── symbolize.cpp # 符号化引擎 diff --git a/docs/user_guide/06_using_find_package.md b/docs/user_guide/06_using_find_package.md index ec97c7e..f2ce7a6 100644 --- a/docs/user_guide/06_using_find_package.md +++ b/docs/user_guide/06_using_find_package.md @@ -51,7 +51,6 @@ sudo make install DESTDIR=/opt/cpp-remote-profiler │ ├── drogon_adapter.h │ ├── http_handlers.h │ ├── log_sink.h - │ └── logger.h └── version.h ``` diff --git a/include/profiler/logger.h b/include/profiler/logger.h deleted file mode 100644 index e2130b2..0000000 --- a/include/profiler/logger.h +++ /dev/null @@ -1,18 +0,0 @@ -/// @file logger.h -/// @brief Logger configuration interface -/// -/// Log sink and log level configuration is now managed through -/// ProfilerManager instances. Include profiler_manager.h and use: -/// profiler.setLogSink(mySink); -/// profiler.setLogLevel(profiler::LogLevel::Debug); - -#pragma once - -#include "log_sink.h" - -PROFILER_NAMESPACE_BEGIN - -// Log configuration is now per-ProfilerManager instance. -// See profiler_manager.h for setLogSink() and setLogLevel() methods. - -PROFILER_NAMESPACE_END diff --git a/plan.md b/plan.md index a68ca61..44de90c 100644 --- a/plan.md +++ b/plan.md @@ -93,8 +93,7 @@ profiler.setLogLevel(profiler::LogLevel::Debug); #### 文件结构 ``` include/profiler/ -├── log_sink.h # LogSink 接口 + LogLevel 枚举 -└── logger.h # 仅 log 宏声明(日志配置移到 ProfilerManager 实例方法) +└── log_sink.h # LogSink 接口 + LogLevel 枚举 src/internal/ ├── log_manager.h # 内部状态管理(非单例,由 ProfilerManager 持有)