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
I have some package in my project like: gorm , gin, slog. I don't want dependant on gorm and gin, How can i use traceid linked log content between gorm and gin module?
We considered a function like slog.NewContext when building slog, and actually had it for a while, but it proved too controversial to include (see the last paragraph of that comment). You can easily write your own functions to put a logger in a context and retrieve it; see the documentation for context.Context.Value.
seankhliao
changed the title
proposal: exp/slog: support instance to context value
proposal: slog: support instance to context value
Mar 7, 2024
Proposal Details
I have some package in my project like: gorm , gin, slog. I don't want dependant on gorm and gin, How can i use traceid linked log content between gorm and gin module?
I want:
so, all modules can write one attribute in one context , and don't need rewrite slog handle.
my code is: golang/exp@master...lingdor:exp:master
thanks
The text was updated successfully, but these errors were encountered: