mirror of
https://github.com/apple/swift-log
synced 2026-11-22 03:40:39 +00:00
Ensure metadata from the multiplex handler’s own provider reaches emitted logs. Fixes #521. ## Motivation `MultiplexLogHandler` accepts a metadata provider in its initializer, but `log(event:)` never invokes it. Provider values such as trace IDs are therefore missing from downstream logs. ## Modifications - Merge the multiplex provider’s metadata into the event before forwarding it. - Preserve explicit per-message metadata overrides. - Add regression tests covering one and two downstream handlers and metadata precedence. ## Result The supplied provider’s metadata is included in emitted logs. Regression tests fail before the fix and pass afterward. All 174 tests pass on macOS with Swift 6.4. Formatting and `git diff --check` also pass.