apple/swift-log
63.9
Adequate · 14 November 2026
4.8k
lines of production code
Swift
primary language
5
measurements over time
What this system is
Features
Added CMake support for Swift targets and test configurations
The build system now includes CMake modules to support Swift targets. This adds infrastructure for detecting the Swift compiler, determining the module triple, and installing Swift modules and documentation files alongside C++ artifacts, enabling users to build and install Swift components using CMake.
cmake · high confidence
Added basic usage snippet for the Logging API
A new Swift code snippet demonstrating how to import the Logging API, create a logger with a label, and log an informational message has been added to the documentation resources.
Snippets · high confidence
Added benchmarking infrastructure for logging performance
Added new benchmarking utilities in Benchmarks/Sources to measure logging performance. This includes a MakeBenchmark helper that configures benchmark runs with instruction and object allocation metrics, and a NoOpLogHandler that implements the LogHandler protocol to capture LogEvent and metadata attributes without producing output, enabling accurate performance measurement of logging operations.
Benchmarks/Sources · high confidence
New InMemoryLogHandler and CMake build support
The library now includes an InMemoryLogHandler in the InMemoryLogging module, allowing tests to capture and inspect log entries without process-wide bootstrapping. CMake build files have been added for both the Logging and InMemoryLogging modules to support CMake-based builds.
Sources · high confidence
SwiftLog now supports compile-time log level elimination via package traits
SwiftLog introduces new package traits (MaxLogLevelDebug through MaxLogLevelNone) that allow developers to eliminate unused log levels at compile time, reducing binary size and overhead. This feature is available starting with Swift 6.1 and is configured via the [e-mail redacted] manifest, enabling users to tailor logging verbosity to their specific needs without runtime cost.
(repo-wide) · high confidence
Test coverage
Added MaxLogLevelWarning benchmark suite for Swift 6.3 and 6.4; Added benchmarks for task-local loggers and metadata sensitivity; Added tests for InMemoryLogHandler; Added tests for the new Swift Testing framework migration and logging API compatibility.
Dependencies
Swift 6.2 upgrade and compile-time log level traits
The package now requires Swift 6.2 and introduces compile-time log level traits (MaxLogLevelNone through MaxLogLevelDebug) that allow users to strip unused log levels from the binary at build time. The package name has changed to swift-log, exposing Logging and InMemoryLogging products, and enables strict concurrency and upcoming compiler features for improved type safety.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 63 → 64 (+0.9)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.
Lenses
- Code Health 98 → 96 (-2.6)
- Architecture 98 → 98 (-0.6)
- Maturity 57 → 59 (+1.5)
- Readiness 64 → 60 (-3.4)
- Security 61 → 61 (+0.0)
- Performance 73 → 85 (+12.0)
Resolved (1)
- Off-boarding risk: anonymized user #1
New (3)
- Edited copies of one member (8 members, 10+ corresponding lines) (Sources/Logging/Logger.swift)
- Edited copy of a member (19 corresponding lines) (Sources/Logging/LogEvent.swift)
- Off-boarding risk: anonymized user #1
Changes since last survey
- 4 commits — 3 feature/other, 1 fixes
By area
- Sources/Logging — 4 commits
Notable commits
- fix: Fix metadata priority in MultiplexLogHandler.metadata (#530)
- change: Add opt-in millisecond precision to StreamLogHandler timestamp (#483)
- change: Remove unnecessary optional so example compiles (#501)
- change: Support raw-identifier module names in Logger.currentModule. (#535)
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
apple/swift-log was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 34b131f794c303b62c38d19263bcf146e538da75 — the exact code this score is about.
- Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-3c33c1882dc1.