|
Logger System 1.0.0
High-performance C++20 thread-safe logging system with asynchronous capabilities
|
doc_id: "LOG-FEAT-003" doc_title: "Logger System Production Feature Matrix" doc_version: "1.0.0" doc_date: "2026-05-21" doc_status: "Released" project: "logger_system"
SSOT: This document is the single source of truth for the production feature matrix of
logger_system— the CMake-toggleable capabilities, their default values, required dependencies, and verification commands.
Last Updated: 2026-05-21 Scope: Issue #636 — part of kcenon/common_system#684
This document lets release consumers determine production support without inferring it from CMake options alone. For prose feature descriptions see FEATURES.md; for the dependency inventory see SOUP.md.
ON or OFF as configured by a default cmake -S . -B build invocation with no extra flags.vcpkg.json feature name that pulls the dependency, where one exists.CMake option() is a no-op when a cache variable of the same name already exists. Two files declare logger options:
CMakeLists.txt — processed first; declares LOGGER_ENABLE_OTLP, LOGGER_USE_ENCRYPTION, LOGGER_USE_THREAD_SYSTEM, and the BUILD_* toggles.cmake/logger_features.cmake — included later (include(logger_features)); declares the remaining LOGGER_* feature flags.Where the same option name appears in both files, the declaration in CMakeLists.txt wins because it runs first. This matters for LOGGER_USE_ENCRYPTION: CMakeLists.txt sets it ON, so the OFF declaration in logger_features.cmake has no effect. The matrix below records the effective default.
| Feature | CMake option | Default | Required dependency | vcpkg feature | Production support | Verification command |
|---|---|---|---|---|---|---|
Async logging (std::jthread standalone) | LOGGER_ENABLE_ASYNC | ON | None (stdlib) | — | Production | cmake -S . -B build && cmake --build build && ctest --test-dir build -R integration |
| thread_system integration | LOGGER_USE_THREAD_SYSTEM | OFF | kcenon-thread-system | thread-system | Production (graceful fallback) | cmake -S . -B build -DLOGGER_USE_THREAD_SYSTEM=ON && cmake --build build && ctest --test-dir build -R thread_system |
| OpenSSL encryption (AES-256-GCM) | LOGGER_USE_ENCRYPTION | ON | OpenSSL 3.0+ | encryption | Production (graceful fallback) | cmake -S . -B build -DLOGGER_USE_ENCRYPTION=ON && cmake --build build && ctest --test-dir build -R encrypted_writer |
| Log compression | LOGGER_USE_COMPRESSION | OFF | zlib | — | Production (graceful fallback) | cmake -S . -B build -DLOGGER_USE_COMPRESSION=ON && cmake --build build |
| Structured logging (JSON) | LOGGER_ENABLE_STRUCTURED_LOGGING | OFF | None (stdlib) | — | Production | cmake -S . -B build -DLOGGER_ENABLE_STRUCTURED_LOGGING=ON && cmake --build build && ctest --test-dir build -R structured_logging |
| Network log writer | LOGGER_ENABLE_NETWORK_WRITER | OFF | None (POSIX/Winsock sockets) | — | Production | cmake -S . -B build -DLOGGER_ENABLE_NETWORK_WRITER=ON && cmake --build build |
| OTLP export (OpenTelemetry) | LOGGER_ENABLE_OTLP | OFF | opentelemetry-cpp, gRPC, Protocol Buffers | otlp | Production (graceful fallback) | cmake -S . -B build -DLOGGER_ENABLE_OTLP=ON && cmake --build build && ctest --test-dir build -R otlp |
| Monitoring / metrics integration | LOGGER_USE_MONITORING | ON | None (stdlib) | — | Production | cmake -S . -B build && cmake --build build |
| Crash handler integration | LOGGER_ENABLE_CRASH_HANDLER | ON | None (stdlib + platform signals) | — | Production | cmake -S . -B build && cmake --build build |
| File rotation | LOGGER_ENABLE_FILE_ROTATION | ON | None (stdlib) | — | Production | cmake -S . -B build && cmake --build build && ctest --test-dir build |
| Lock-free queue | LOGGER_USE_LOCK_FREE_QUEUE | inherits USE_LOCKFREE (OFF unless set) | None (stdlib atomics) | — | Production | cmake -S . -B build -DLOGGER_USE_LOCK_FREE_QUEUE=ON && cmake --build build && ctest --test-dir build -R thread_safety |
| Dependency injection (built-in) | LOGGER_USE_DI | ON | None (stdlib) | — | Production | cmake -S . -B build && cmake --build build |
| External DI container | LOGGER_USE_EXTERNAL_DI | OFF | External DI container | — | Example-only | cmake -S . -B build -DLOGGER_USE_EXTERNAL_DI=ON -DLOGGER_FORCE_LIGHTWEIGHT=OFF && cmake --build build |
Note on
LOGGER_USE_LOCK_FREE_QUEUE: its default is the value of the upstreamUSE_LOCKFREEvariable; whenUSE_LOCKFREEis not provided by a parent project or the command line it evaluates toOFF. The option also requiresLOGGER_ENABLE_ASYNC=ON; if async is disabled CMake forces the lock-free queueOFFwith a warning.Note on
LOGGER_USE_EXTERNAL_DI: it is mutually exclusive withLOGGER_FORCE_LIGHTWEIGHT(defaultON). With bothON, CMake disablesLOGGER_USE_EXTERNAL_DIand emits a warning. To exercise the external DI path, also pass-DLOGGER_FORCE_LIGHTWEIGHT=OFF.
A default configuration — cmake -S . -B build with no extra flags — enables only the following feature set and requires no optional third-party integrations beyond the mandatory common_system dependency:
LOGGER_ENABLE_ASYNC = ONLOGGER_USE_ENCRYPTION = ON (see encryption note below)LOGGER_USE_MONITORING = ONLOGGER_ENABLE_CRASH_HANDLER = ONLOGGER_ENABLE_FILE_ROTATION = ONLOGGER_USE_DI = ONLOGGER_FORCE_LIGHTWEIGHT = ONAll ON-by-default features in the matrix above are satisfied by the C++20 standard library and common_system. The default build therefore configures and tests cleanly on a toolchain with no OpenSSL, OpenTelemetry, gRPC, zlib, or thread_system present.
LOGGER_USE_ENCRYPTION is ON by default (declared in CMakeLists.txt). However, encryption is a graceful-fallback feature:
LOGGER_USE_ENCRYPTION=ON, cmake/logger_dependencies.cmake runs find_package(OpenSSL 3.0 QUIET).LOGGER_HAS_ENCRYPTION is set TRUE.LOGGER_USE_ENCRYPTION is forced OFF with a CMake warning, and the build proceeds without the encrypted writer. The configure step does not fail.OpenSSL 3.0 or newer is required. OpenSSL 1.1.x reached end of life in September 2023 and is explicitly not supported; find_package(OpenSSL 3.0 ...) rejects 1.1.x versions. The pinned vcpkg version is OpenSSL 3.4.1 (vcpkg.json overrides).
Consequence for release consumers: a default build on a host with OpenSSL 3.0+ ships the encrypted writer; a default build on a host without it ships an otherwise-identical logger minus the encrypted writer. If the encrypted writer is mandatory for your deployment, ensure OpenSSL 3.0+ is installed and verify with ctest --test-dir build -R encrypted_writer.
LOGGER_USE_THREAD_SYSTEM, default OFF)kcenon-thread-system (vcpkg feature thread-system).ON, CMake calls unified_find_dependency(thread_system QUIET). If found, LOGGER_HAS_THREAD_SYSTEM is defined and the shared thread pool backs async I/O; if not found, the logger falls back to standalone std::jthread async mode with a status message.LOGGER_ENABLE_OTLP, default OFF)otlp-http + otlp-grpc features), Protocol Buffers (>= 3.21.0), gRPC (>= 1.51.1) — pulled by the otlp vcpkg feature.ON, the OTLP writer exports logs over HTTP/gRPC. When the OTLP transport is unavailable at runtime the writer returns false and warns rather than crashing (see commit ccef24e).LOGGER_ENABLE_NETWORK_WRITER, default OFF)getaddrinfo (see commit dc1837d).LOGGER_USE_COMPRESSION, default OFF)The matrix has been verified along two axes required by issue #636:
cmake -S . -B build configures using only common_system and the C++20 standard library. No OpenSSL/OTLP/gRPC/zlib/thread_system is required for a default configure, because every ON-by-default feature is stdlib-backed and encryption falls back gracefully when OpenSSL is absent.LOGGER_USE_THREAD_SYSTEM=ON and LOGGER_ENABLE_OTLP=ON presets above are documented with explicit dependency lists and ctest verification commands (-R thread_system, -R otlp).Full compilation and ctest execution for every optional preset is delegated to CI, which provisions the required toolchains.