Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
There were a few options to deal with the fact that many of these call sites might not have a logger set up, but I decided to go with the least interesting one: do it the same way as everywhere else. Structlog will be created using the defaults, then overriden once we have the information from the command that the user entered. If it has not been configured yet it will use the unconfigured one. The advantage here is that we will not have to change these log call sites once we refactor the cli in #4179. There is an edge case where a keyboard interrupt or an exception could occur before the default initialization of Structlog which happens on inport of the module, but I think it's acceptable to be a little splody when the whole python app hasn't even loaded yet.
Checklist
CHANGELOG.md
and added information about my change