refactor(factories): remove unnecessary di_container_factory and monitoring_factory#276
Merged
Merged
Conversation
…toring_factory Remove redundant factory implementations as part of C++20 module preparation: - Remove public API factories (include/kcenon/logger/core/di/, monitoring/) - di_container_factory.h: simple wrapper with unused container types - di_container_interface.h: non-template interface never used - monitoring_factory.h: embedded simple_monitor class, redundant - Remove internal factories (src/impl/di/, monitoring/) - di_container_factory.h: thread_system fallback logic never invoked - monitoring_factory.h: thread_system fallback logic never invoked - Remove unimplemented DI methods from logger.h: - set_di_container(), has_di_container() - add_writer_from_di(), register_writer_factory() - enable_di(), get_di_strategy() - Update tests to remove factory-related test cases - Update documentation to remove factory references This follows Kent Beck's "Fewest Elements" principle by removing factory patterns that added complexity without providing value. The following factories are retained and actively used: - filter_factory: log filtering with builder pattern - formatter_factory: output formatters with presets - writer_factory: writer creation with presets Closes #274
- Remove di/di_container_interface.h include from logger_builder.h - Remove DI Container examples from INTEGRATION.md documentation - Remove DI Container reference from STRUCTURE.md table - Remove unused mock_di_container.hpp test file This fixes the CI build failure caused by missing di_container_interface.h.
- Fix ci::source_location to kcenon::common::source_location in di_pattern_example.cpp - Remove outdated tests/unit/integration_test directory that used old source structure and referenced deleted files - Update tests/unit/CMakeLists.txt to remove integration_test subdirectory
kcenon
added a commit
that referenced
this pull request
Apr 13, 2026
…toring_factory (#276) * refactor(factories): remove unnecessary di_container_factory and monitoring_factory Remove redundant factory implementations as part of C++20 module preparation: - Remove public API factories (include/kcenon/logger/core/di/, monitoring/) - di_container_factory.h: simple wrapper with unused container types - di_container_interface.h: non-template interface never used - monitoring_factory.h: embedded simple_monitor class, redundant - Remove internal factories (src/impl/di/, monitoring/) - di_container_factory.h: thread_system fallback logic never invoked - monitoring_factory.h: thread_system fallback logic never invoked - Remove unimplemented DI methods from logger.h: - set_di_container(), has_di_container() - add_writer_from_di(), register_writer_factory() - enable_di(), get_di_strategy() - Update tests to remove factory-related test cases - Update documentation to remove factory references This follows Kent Beck's "Fewest Elements" principle by removing factory patterns that added complexity without providing value. The following factories are retained and actively used: - filter_factory: log filtering with builder pattern - formatter_factory: output formatters with presets - writer_factory: writer creation with presets Closes #274 * fix(build): remove remaining DI container references from header files - Remove di/di_container_interface.h include from logger_builder.h - Remove DI Container examples from INTEGRATION.md documentation - Remove DI Container reference from STRUCTURE.md table - Remove unused mock_di_container.hpp test file This fixes the CI build failure caused by missing di_container_interface.h. * fix(build): resolve source_location namespace and remove outdated tests - Fix ci::source_location to kcenon::common::source_location in di_pattern_example.cpp - Remove outdated tests/unit/integration_test directory that used old source structure and referenced deleted files - Update tests/unit/CMakeLists.txt to remove integration_test subdirectory
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.
Summary
di_container_factoryandmonitoring_factoryimplementationslogger.hChanges
Removed Files
include/kcenon/logger/core/di/di_container_factory.hinclude/kcenon/logger/core/di/di_container_interface.hinclude/kcenon/logger/core/monitoring/monitoring_factory.hsrc/impl/di/di_container_factory.hsrc/impl/monitoring/monitoring_factory.hModified Files
logger.hdi_container_test.cppmonitoring_test.cppAPI_REFERENCE.mdARCHITECTURE.mdSTRUCTURE.mdRetained Factories (Actively Used)
filter_factory: Log filtering with builder patternformatter_factory: Output formatters with presetswriter_factory: Writer creation with presetsMotivation
This follows Kent Beck's "Fewest Elements" principle by removing factory patterns that added complexity without providing value. The removed factories:
Test plan
cmake --build buildCloses #274