Merged
Conversation
- Remove spdlog dependency: DefaultLogSink now uses std::cout/std::cerr - Replace spdlog/fmt with C++20 std::format in log macros - Add HttpServer abstraction interface (include/profiler/http_server.h) - Remove singleton from LogManager, make it instance-owned - Update log macros to use log_manager_ member instead of global singleton - Update plan.md with full design document for the refactoring Still TODO: ProfilerManager singleton removal, Drogon adapter, web_server refactoring, CMake target split, example/test updates Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Record completed tasks (spdlog removal, HttpServer interface, LogManager de-singleton) and remaining tasks with specific file-level change instructions for next development session. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove ProfilerManager singleton: delete getInstance(), make constructor
public, use unique_ptr<LogManager> (PIMPL) for per-instance log config
- Create HttpServer abstraction: pure C++ interface (Request/Response structs)
in include/profiler/http_server.h, no framework dependency
- Create Drogon adapter: src/backends/drogon/drogon_http_server.{h,cpp}
implements HttpServer interface, only place that #includes <drogon/drogon.h>
- Rewrite web_server.cpp: all routes use HttpServer abstraction instead of
Drogon directly, remove Json::Value dependency (manual JSON string building)
- Remove spdlog dependency: DefaultLogSink uses std::cout/std::cerr,
log macros use std::format instead of fmt
- Split CMake targets: profiler_core (no Drogon) + profiler_web (optional,
requires Drogon), add REMOTE_PROFILER_ENABLE_WEB option
- Update logger.h: global setSink/setLogLevel removed, now ProfilerManager
instance methods
- Signal handler: lazy install on first captureAllThreadStacks() call
- Update example and tests for non-singleton API
- Remove spdlog from vcpkg.json
All 18 tests pass (LoggerTest: 7, FullFlowTest: 6, CPUProfileTest: 5).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the HttpServer interface pattern with a simpler, more flexible design: ProfilerHttpHandlers provides framework-agnostic handler methods that return HandlerResponse structs. Users with any web framework can call handlers and wrap responses with their own request/response types. - Add include/profiler/http_handlers.h (HandlerResponse + ProfilerHttpHandlers) - Add src/http_handlers.cpp (all profiler endpoint business logic) - Simplify web_server.cpp to a thin Drogon adapter - Delete include/profiler/http_server.h and src/backends/drogon/ - Update example to use registerHttpHandlers(profiler) directly - Move page handlers (WebResources) to profiler_web, data handlers to profiler_core Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace all getInstance() singleton references with local instances - Add ProfilerHttpHandlers and HandlerResponse API documentation - Add integration examples for any web framework (not just Drogon) - Update setSink/setLogLevel as ProfilerManager instance methods - Remove spdlog references (now uses std::cout/cerr) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rename web_server.h/cpp → profiler/drogon_adapter.h/src/drogon_adapter.cpp - Rename registerHttpHandlers() → registerDrogonHandlers() - Fix all getInstance() references in docs/examples → instance creation - Fix profiler_lib references → profiler_core - Update log_sink.h doc example to use instance method - Update plan.md: remove outdated HttpServer/singleton/spdlog descriptions - Update CMakeLists.txt install target for new header path Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix test_cpu_profile.cpp: replace member function pointer cast with free function pointer (avoids -Werror=pmf-conversions) - Apply clang-format-18 to profiler_manager.h/cpp, log_macros.h Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.