You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Change loggers to add infos not in context but as arguments. #133
For now, the loggers uses additional information from context, but doing a custom logger makes it hard to get those info as each one should be unwrapped from the context.
So we should make it explicitly passed by argument in the generated code and remove the context embedding in loggers (not in the generated code though).
PR #331 adds extensions.LogInfosFromContext so custom loggers can pull all the controller's contextual values (channel, correlation ID, direction, …) in a single call, addressing the immediate pain of unwrapping each context key manually.
The remaining part of this issue — having the generated code pass this information as explicit LogInfo arguments and dropping the context enrichment from the built-in loggers — is a breaking, repo-wide change (it alters every generated log call and the built-in loggers' output sourcing). Leaving this issue open to track that larger refactor.
The custom-logger pain shipped in #331: extensions.LogInfosFromContext lets a custom logger pull all the controller's contextual values (channel, correlation ID, direction, …) out of the context in one call.
The remaining (breaking) refactor — having the generated code pass these as explicit LogInfo arguments and dropping context enrichment from the built-in loggers — is tracked in #334. Closing this issue in favor of that focused follow-up.
Activity
feat(extensions): add LogInfosFromContext helper (#133) (#331)
lerenn commentedon Jun 12, 2026
PR #331 adds
extensions.LogInfosFromContextso custom loggers can pull all the controller's contextual values (channel, correlation ID, direction, …) in a single call, addressing the immediate pain of unwrapping each context key manually.The remaining part of this issue — having the generated code pass this information as explicit
LogInfoarguments and dropping the context enrichment from the built-in loggers — is a breaking, repo-wide change (it alters every generated log call and the built-in loggers' output sourcing). Leaving this issue open to track that larger refactor.lerenn commentedon Jun 12, 2026
The custom-logger pain shipped in #331:
extensions.LogInfosFromContextlets a custom logger pull all the controller's contextual values (channel, correlation ID, direction, …) out of the context in one call.The remaining (breaking) refactor — having the generated code pass these as explicit
LogInfoarguments and dropping context enrichment from the built-in loggers — is tracked in #334. Closing this issue in favor of that focused follow-up.