-
Notifications
You must be signed in to change notification settings - Fork 96
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
Use log.Ctx
for all logging calls
#2001
Comments
Using |
wjam
added a commit
that referenced
this issue
Feb 22, 2023
This adds a second type of clean up function - one that takes a `context.Context`. This makes it easier to avoid problems of using a cancelled context when cleaning up, as the logic doesn't need to be spread about, and makes it easy to migrate a portion of log statements that aren't using `log.Ctx` to do so. Part of #2001
wjam
added a commit
that referenced
this issue
Feb 22, 2023
This adds a second type of clean up function - one that takes a `context.Context`. This makes it easier to avoid problems of using a cancelled context when cleaning up, as the logic doesn't need to be spread about, and makes it easy to migrate a portion of log statements that aren't using `log.Ctx` to do so. Part of #2001
wjam
added a commit
that referenced
this issue
Feb 22, 2023
This adds a second type of clean up function - one that takes a `context.Context`. This makes it easier to avoid problems of using a cancelled context when cleaning up, as the logic doesn't need to be spread about, and makes it easy to migrate a portion of log statements that aren't using `log.Ctx` to do so. Part of #2001
wjam
added a commit
that referenced
this issue
Feb 22, 2023
This adds a second type of clean up function - one that takes a `context.Context`. This makes it easier to avoid problems of using a cancelled context when cleaning up, as the logic doesn't need to be spread about, and makes it easy to migrate a portion of log statements that aren't using `log.Ctx` to do so. Part of #2001
wjam
added a commit
that referenced
this issue
Feb 23, 2023
Use `log.Ctx` for more logging statements. Also move the `signal.NotifyContext` calls to the root command so all commands can cleanly tidy up. Part #2001
wjam
added a commit
that referenced
this issue
Feb 23, 2023
Use `log.Ctx` for more logging statements. Also move the `signal.NotifyContext` calls to the root command so all commands can cleanly tidy up. Part #2001
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A number of different fields are added to a logger that is stored within the context. We should ensure all logging calls use the
log.Ctx(..).Info
pattern rather thanlog.Info
.Ideally, we should also have linting step which enforces this.
The text was updated successfully, but these errors were encountered: