Log through the injected logger with context #1927
Notifications
Due Date
No due date set.
Blocks
#1920 Effective Go: critical paths
sam/archie
Reference: sam/archie#1927
Reference in new issue
Block a user
archied update.go and prbench use the global slog; about 95 calls on injected loggers use the non-Context methods, so their lines carry no trace id. Convert them, threading ctx where a function lacks one.
Done when no global slog call or non-Context logger call remains outside cmd/.
Done in
f4c304cffor archied, prbench and the injected-logger sweep. natsrpc.RegisterAll and its wrappers now take the registering context (handlers use it without cancellation), which removed the contextcheck suppressions. Left: sdnotify (no ctx at its archied call sites) and staterpc logFailure (115 call sites), filed as a follow-up.