-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli: rework audit log trace and add error log trace
This commit does two things: - Add error log tracing via the `/v1/log/error/trace` API - Rework the audit log tracing CLI UI. Now, the log event stream to STDOUT is displayed as a table: ``` ┌──────────┬─────────────┬─────────────┬─────────────────────────────────────────┬──────────┐ │ Time │ Identity │ Status │ API Operations │ Response │ ├──────────┼─────────────┼─────────────┼─────────────────────────────────────────┼──────────┤ │ 13:43:48 │ 3ecfcdf38f… │ 200 OK │ /v1/log/audit/trace │ 282µs │ │ 15:08:06 │ 3ecfcdf38f… │ 200 OK │ /v1/key/generate/my-minio-key │ 550µs │ └──────────┴─────────────┴─────────────┴─────────────────────────────────────────┴──────────┘ ``` A user can specify whether the error or the audit log should be traced via the `--type=[audit|error]` flag. The default is `--type=audit` which is aligned with the previous behavior. If a user wants to trace error and audit logs at the same time (e.g. with `--json` flag) the following bash/zsh command can be used: ``` { kes log trace --type=error --json & kes log trace --type=audit --json; } | jq ``` The current table CLI output requires that the terminal supports unicode characters - which is the case for modern terminals, including windows.
- Loading branch information
1 parent
477b32b
commit a75c6ec
Showing
6 changed files
with
525 additions
and
42 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
Oops, something went wrong.