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.
Adds a flag that sets shotover to write its tracing logs as json instead of the default human readable format.
e.g.
My original motivation of this change is to be able to make assertions on tracing logs in our integration tests.
However users will want to be able to process shotovers logs programmatically so this is an important feature for shotover in its own right.
As such it should be reviewed for that purpose, as a user exposed feature.
To test it out you can run:
cargo run
uses --log-format human by defaultcargo run --log-format json
Feel free to bikeshed arg naming.
Due to a currently poor API from tracing the reload handle type currently includes whether we are using json formatting or not.
So in order to handle it generically we need to wrap each case in an enum and then pass that into our web server.