-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert lib/utils to slog #50340
Convert lib/utils to slog #50340
Conversation
This pull request is automatically being deployed by Amplify Hosting (learn more). |
026cc71
to
3ba3579
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM, but those context.Backgroud() calls outside test files are a bit concerning. It may be less obvious to replace them with a proper context even if the calling function eventually takes it as an argument. But possibly that's something already discussed?
@@ -156,7 +155,7 @@ func (l *LoadBalancer) AddBackend(b NetAddr) { | |||
l.Lock() | |||
defer l.Unlock() | |||
l.backends = append(l.backends, b) | |||
l.Debugf("Backends %v.", l.backends) | |||
l.logger.DebugContext(l.ctx, "Backends updated", "backends", l.backends) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Backends added"?
Per RFD 154:
|
3ba3579
to
bc00b3d
Compare
This only converts the places in the utils package that were logging with logrus, but it does not fully remove the logrus package as a dependency. The package is home to the logrus text formatter which needs to exist until slog is the only logging mechanism in use.
bc00b3d
to
63a47ba
Compare
This only converts the places in the utils package that were logging with logrus, but it does not fully remove the logrus package as a dependency. The package is home to the logrus text formatter which needs to exist until slog is the only logging mechanism in use.