[SLG-0006]: task-local logger implementation#459
Merged
kukushechkin merged 30 commits intoJun 23, 2026
Merged
Conversation
kukushechkin
force-pushed
the
SLG-0006-task-local-logger-implementation
branch
from
May 18, 2026 12:01
c5471e9 to
16bce4e
Compare
kukushechkin
marked this pull request as draft
May 18, 2026 12:04
kukushechkin
force-pushed
the
SLG-0006-task-local-logger-implementation
branch
from
May 18, 2026 12:14
16bce4e to
80e5dfd
Compare
kukushechkin
force-pushed
the
SLG-0006-task-local-logger-implementation
branch
from
May 19, 2026 13:58
80e5dfd to
0ed85c1
Compare
weissi
reviewed
May 27, 2026
weissi
reviewed
May 27, 2026
weissi
reviewed
May 27, 2026
weissi
reviewed
May 27, 2026
weissi
reviewed
May 27, 2026
ktoso
reviewed
Jun 4, 2026
…ithub.com/kukushechkin/swift-log into SLG-0006-task-local-logger-implementation
kukushechkin
marked this pull request as ready for review
June 11, 2026 15:12
FranzBusch
reviewed
Jun 11, 2026
FranzBusch
reviewed
Jun 22, 2026
FranzBusch
approved these changes
Jun 22, 2026
FranzBusch
left a comment
Member
There was a problem hiding this comment.
Only a small doc nits otherwise LGTM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This proposal adds task-local logger storage so that metadata can accumulate across async
call stacks without threading a
Loggerthrough every function signature.Motivation:
Metadata propagation requires threading a logger through every layer. Every function on
the path from request ingress to the bottom of the call stack has to accept, mutate, and
forward a
Logger. Libraries must choose between polluting their public API with alogger:parameter andlosing all the caller's context. There is no third option today.
Modifications:
@TaskLocalLoggerinstance added.Logger.currentAPI.Result:
Users can now automatically propagate accumulated metadata into libraries without explicitly passing loggers through the API boundaries.