-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
One-line contextual logging of Kore actions (#3837)
Combines #3833 and #3831 - in Kore, implement rendering of oneline logs prefixed with the context stack, in the spirit of #3826 - add `--log-format <standard|oneline|json> (default:oneline)` to `kore-rpc-booster`. - to recover the old behaviour of `-l Rewrite` and friends, use `--log-format standard`, i.e. `kore-rpc-booster --log-format standard -l Rewrite` - if any `--log-context` is passed, the log format is effectively override to be `oneline` - in `booster/tools/booster/Server.hs`, construct a log action to be passed to Kore. If no `--log-context` options are passed, then the old `-l RewriteKore` and fields levels still work with `--log-format standard`. If `--log-context` is passed, then the complete set of proxy-compatible Kore log entries is enabled, and the filtering is done using the glob context filter late in the colog pipeline. Things to do in a follow-up: - json logging is inconsistent, both the interface and the implementation: - to get simplification JSON logs from both Booster and Kore, we currently need to give two options: `kore-rpc-booster --log-format json -l SimplifyJson`, which is not ideal. We need to remove `-l SimplifyJson` and forward the log format to Booster instead. - To implement the previous item in a clean way, we actually need to stop emitting the logs at `SimplifyJson` level and instead render the regular log items as json. - file logging is inconsistent. It is currently not possible to redirect Booster's contextual logs into a file. - the performance of context filtering in Kore is likely terrible, since we match the while log message, as a string, against the glob pattern. There is not penalty if the contextual logging is off however. --------- Co-authored-by: github-actions <[email protected]> Co-authored-by: Jost Berthold <[email protected]> Co-authored-by: rv-jenkins <[email protected]>
- Loading branch information
1 parent
88ef647
commit fcaae28
Showing
26 changed files
with
855 additions
and
614 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
547 changes: 277 additions & 270 deletions
547
booster/test/rpc-integration/test-log-simplify-json/simplify-log.txt.golden
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.