Skip to content

feat(modules): add C++20 module files for kcenon.logger#277

Merged
kcenon merged 1 commit into
mainfrom
feature/275-cpp20-module-files
Jan 3, 2026
Merged

feat(modules): add C++20 module files for kcenon.logger#277
kcenon merged 1 commit into
mainfrom
feature/275-cpp20-module-files

Conversation

@kcenon

@kcenon kcenon commented Jan 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Create C++20 module interface for logger_system as part of Tier 2 libraries
  • Add module directory structure with 4 module files (.cppm)
  • Update CMakeLists.txt with optional module support (requires CMake 3.28+)
  • Header-based build continues to work during transition period

Module Structure

export module kcenon.logger;

import kcenon.common;           // Required dependency

export import :core;            // Logger, LogContext, LogCollector
export import :backends;        // Integration backends  
export import :analysis;        // Log analysis utilities

Files Added

  • src/modules/logger.cppm - Primary module interface
  • src/modules/core.cppm - Core partition
  • src/modules/backends.cppm - Backends partition
  • src/modules/analysis.cppm - Analysis partition

CMake Usage

cmake -DLOGGER_USE_MODULES=ON ..  # Requires CMake 3.28+

Prerequisites (Completed)

Test plan

  • Build without modules (default) - verified passing
  • All existing tests pass - verified 10/10 logger_system tests pass
  • Build with modules (LOGGER_USE_MODULES=ON) - requires CMake 3.28+

Closes #275

Create C++20 module interface for logger_system as part of Tier 2
libraries in the C++20 Module Migration project.

Module Structure:
- logger.cppm: Primary module interface
- core.cppm: Core partition (Logger, LogContext, LogCollector)
- backends.cppm: Backends partition (integration_backend, standalone_backend)
- analysis.cppm: Analysis partition (log_analyzer, analysis_stats)

CMake Support:
- Add LOGGER_USE_MODULES option (requires CMake 3.28+)
- LOGGER_HAS_MODULES compile definition when modules are active
- Header-based build still works during transition period

Documentation:
- Update CHANGELOG.md with module details
- Update PROJECT_STRUCTURE.md with modules directory
@kcenon kcenon merged commit 8af1eef into main Jan 3, 2026
29 checks passed
@kcenon kcenon deleted the feature/275-cpp20-module-files branch January 3, 2026 08:07
kcenon added a commit that referenced this pull request Apr 13, 2026
Create C++20 module interface for logger_system as part of Tier 2
libraries in the C++20 Module Migration project.

Module Structure:
- logger.cppm: Primary module interface
- core.cppm: Core partition (Logger, LogContext, LogCollector)
- backends.cppm: Backends partition (integration_backend, standalone_backend)
- analysis.cppm: Analysis partition (log_analyzer, analysis_stats)

CMake Support:
- Add LOGGER_USE_MODULES option (requires CMake 3.28+)
- LOGGER_HAS_MODULES compile definition when modules are active
- Header-based build still works during transition period

Documentation:
- Update CHANGELOG.md with module details
- Update PROJECT_STRUCTURE.md with modules directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MODULE] Create C++20 module files for kcenon.logger

1 participant