You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]>
0 commit comments