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
fix(contrib): resolve slog.Default() lazily to respect LOG_LEVEL=debug
Contrib components were capturing slog.Default() at construction time
and storing it as a struct field. Because plugins are constructed before
chaperone.Run() calls configureLogging(), all contrib debug logs were
silently discarded when LOG_LEVEL=debug was set.
Replace the eager-capture pattern with a log() helper method on each
struct that calls slog.Default() at emit time. An explicit Logger in the
config is used as-is; a nil Logger defers to whichever logger is
currently installed globally.
Affected construction sites:
- mux.go: NewMux() no longer pre-captures slog.Default()
- static_mapping.go: NewStaticMapping() no longer pre-captures slog.Default()
- microsoft/token.go: NewRefreshTokenSource() no longer pre-captures slog.Default()
- oauthutil/token.go: NewTokenFetcher() no longer pre-captures slog.Default()
- oauth/token.go: tokenManager.log() added for lazy resolution
- oauth/refreshtoken.go: RefreshToken.log() added for lazy resolution
Fixes LITE-33931.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments