feat: integrate logger_system for structured logging#6
Conversation
Replace std::cout/cerr with structured logging throughout network_system. This provides better debugging capabilities, log level filtering, and prepares for future monitoring integration. Changes: - Add logger_integration interface with basic_logger and logger_system_adapter - Replace initial std::cout/cerr calls with NETWORK_LOG macros - Add BUILD_WITH_LOGGER_SYSTEM CMake option for conditional compilation - Implement timestamp and source location tracking
- Add logger_integration.h to architecture diagram in README - Include BUILD_WITH_LOGGER_SYSTEM in build configuration examples - Document logger system as optional dependency - Add comprehensive logger integration section to CHANGELOG - Create new INTEGRATION.md guide with detailed logger usage - Document all integration options and configuration methods
Update include paths from "network/" to "network_system/" in legacy compatibility files to maintain consistency with the new project structure. This ensures proper header resolution when building the project. Changed files in core/, session/, and internal/ directories to use the correct project-wide header paths while maintaining network_module namespace for backward compatibility.
- Add explicit underlying type (int) to log_level enum class - Use std::atomic<int> instead of std::atomic<log_level> for portability - Add explicit casts when comparing/assigning log levels - Include <atomic> header for std::atomic support This fixes compilation errors on GCC/Linux where std::atomic requires complete type information for enum classes.
Performance ComparisonBase Branch ResultsThroughput: inf msg/s PR Branch ResultsThroughput: inf msg/s |
- Update thread_system to use kcenon::thread namespace and new headers - Fix messaging_bridge to use kcenon::thread::thread_pool instead of thread_system::thread_pool - Add thread_system and logger_system include paths to all test targets - Enable proper linking of updated thread_base and LoggerSystem libraries - Remove obsolete Makefile in favor of CMake build system All tests now build successfully with updated dependencies.
- Ignore Unix/macOS test executables without extensions - Prevent test binaries from being accidentally committed
- Remove binary executables stress_test and test_e2e from version control - These should be generated during build, not tracked in repository
Performance ComparisonBase Branch ResultsThroughput: 10000000.00 msg/s PR Branch ResultsThroughput: inf msg/s |
* feat(logging): integrate logger_system for centralized logging Replace std::cout/cerr with structured logging throughout network_system. This provides better debugging capabilities, log level filtering, and prepares for future monitoring integration. Changes: - Add logger_integration interface with basic_logger and logger_system_adapter - Replace initial std::cout/cerr calls with NETWORK_LOG macros - Add BUILD_WITH_LOGGER_SYSTEM CMake option for conditional compilation - Implement timestamp and source location tracking * docs: update documentation for logger system integration - Add logger_integration.h to architecture diagram in README - Include BUILD_WITH_LOGGER_SYSTEM in build configuration examples - Document logger system as optional dependency - Add comprehensive logger integration section to CHANGELOG - Create new INTEGRATION.md guide with detailed logger usage - Document all integration options and configuration methods * fix: correct header include paths in legacy files Update include paths from "network/" to "network_system/" in legacy compatibility files to maintain consistency with the new project structure. This ensures proper header resolution when building the project. Changed files in core/, session/, and internal/ directories to use the correct project-wide header paths while maintaining network_module namespace for backward compatibility. * fix: resolve atomic log_level compilation issue on Linux - Add explicit underlying type (int) to log_level enum class - Use std::atomic<int> instead of std::atomic<log_level> for portability - Add explicit casts when comparing/assigning log levels - Include <atomic> header for std::atomic support This fixes compilation errors on GCC/Linux where std::atomic requires complete type information for enum classes. * feat(integration): update thread_system and logger_system integration - Update thread_system to use kcenon::thread namespace and new headers - Fix messaging_bridge to use kcenon::thread::thread_pool instead of thread_system::thread_pool - Add thread_system and logger_system include paths to all test targets - Enable proper linking of updated thread_base and LoggerSystem libraries - Remove obsolete Makefile in favor of CMake build system All tests now build successfully with updated dependencies. * chore(build): add test executables to .gitignore - Ignore Unix/macOS test executables without extensions - Prevent test binaries from being accidentally committed * chore(build): remove test executables from git tracking - Remove binary executables stress_test and test_e2e from version control - These should be generated during build, not tracked in repository
Round-2 reviewer feedback (M1, Issue #1115): the Round-6 direct-call refactor changed the semantics of ServerUnknownFrameTypeIsHandled- WithoutCrashing — the original wire-level test sent a raw frame header with type=0xFF, exercising EITHER the process_frame default switch arm OR the run_io parse-error path (RFC 7540 §5.5 unknown-type discard). Direct invocation through Http2ClientTestAccess::process_frame cannot construct a frame instance with an undefined type because frame::parse rejects unknown types upstream of process_frame. The TEST_F now passes a null unique_ptr<frame>, which exercises the null-pointer defensive guard at src/protocols/http2/http2_client.cpp:620 — a complementary arm, not the unknown-type dispatch. The unknown-type wire path remains covered by MalformedServerSettingsTypeByteTriggersConnectTimeout (which lives on the multiplier scaffold and uses frame_injector to corrupt the type byte on a real socket). Renamed in place (no new TEST_F added, AC #6 preserved): - ServerUnknownFrameTypeIsHandledWithoutCrashing + ProcessFrameNullPointerGuardReturnsInvalidArgument The implementation comment block is rewritten to explain the semantic shift so future maintainers see why the rename happened.
Round-2 reviewer feedback (M1, Issue #1115): the Round-6 direct-call refactor changed the semantics of ServerUnknownFrameTypeIsHandled- WithoutCrashing — the original wire-level test sent a raw frame header with type=0xFF, exercising EITHER the process_frame default switch arm OR the run_io parse-error path (RFC 7540 §5.5 unknown-type discard). Direct invocation through Http2ClientTestAccess::process_frame cannot construct a frame instance with an undefined type because frame::parse rejects unknown types upstream of process_frame. The TEST_F now passes a null unique_ptr<frame>, which exercises the null-pointer defensive guard at src/protocols/http2/http2_client.cpp:620 — a complementary arm, not the unknown-type dispatch. The unknown-type wire path remains covered by MalformedServerSettingsTypeByteTriggersConnectTimeout (which lives on the multiplier scaffold and uses frame_injector to corrupt the type byte on a real socket). Renamed in place (no new TEST_F added, AC #6 preserved): - ServerUnknownFrameTypeIsHandledWithoutCrashing + ProcessFrameNullPointerGuardReturnsInvalidArgument The implementation comment block is rewritten to explain the semantic shift so future maintainers see why the rename happened.
Summary
Changes
Implementation
logger_integration.handlogger_integration.cppwith logger interfacebasic_logger: Console output for standalone operationlogger_system_adapter: Integration with external logger_system when availableCode Migration
messaging_client.cppmessaging_server.cppmessaging_session.cppsend_coroutine.cpppipeline.cppBuild System
Documentation
Features
Test Plan
Breaking Changes
None - All changes are backward compatible
Related Issues