Skip to content

refactor(di): Phase 3 — migrate logger_system to service_container #367

Description

@kcenon

Background

Part of #363 — Phase 3

Replace lightweight_di_container in logger_system with common_system::service_container registration.

Scope

  • Replace lightweight_di_container<T> (string-based) with type-based service_container registration
  • Update writer/formatter/filter factory patterns
  • Remove lightweight_di_container.h, di_container_interface.h, lightweight_container.h
  • Update service_registration.h to use ModuleRegistrar concept
  • Verify all logger_system tests pass

Key Migration Points

  • String-based resolve("name") → Type-based resolve<IWriter>()
  • register_factory() / register_singleton()register_factory<T>() with service_lifetime
  • Error codes: logger-specific → common::di::di_error_codes

Affected Files

  • src/impl/di/lightweight_di_container.h (remove)
  • src/impl/di/di_container_interface.h (remove)
  • src/impl/di/lightweight_container.h (remove)
  • include/kcenon/logger/di/service_registration.h (update)
  • tests/unit/di_test/di_container_test.cpp (update)

Acceptance Criteria

  • lightweight_di_container removed
  • All services registered through service_container
  • All tests pass under ASAN and TSAN

Metadata

Metadata

Assignees

Labels

refactoringCode refactoring and improvements

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions