-
Notifications
You must be signed in to change notification settings - Fork 613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display formatted logs for Toolkit Components #748
Comments
I think such a command would be a good UX improvement if we allow users to filter the logs by level, kind, name and namespace. Print kustomize-controller reconciliation errors:
Print reconciliations errors of a Kustomization named
We need to decide how we want to display the logs in the console output. {"level":"error","ts":"2021-01-20T08:27:45.548Z","logger":"controller.kustomization","msg":"Reconciler error","reconciler group":"kustomize.toolkit.fluxcd.io","reconciler kind":"Kustomization","name":"podinfo","namespace":"default","error":"apply failed: The Deployment \"podinfo\" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{\"app\":\"podinfo\", \"app.kubernetes.io/name\":\"podinfo\"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable\n"} |
It could be also useful to filter logs by level without specifying the component Print all recently occured errors: We could provide a default output-format and let the user overwrite it via an environment variable?! %TIMESTAMP %LEVEL %KIND - %MESSAGE The output would look like this: Another approach would be to simply pass the current json log to a json processor like: jq |
Showing the
Then I see no reason to implement |
Output for log level
Output for log level
|
I propose this format:
|
Sounds good to me |
OCI HelmRepo: handle status conditions in-line
It would be nice if the CLI would be able to display formatted logs for all of the Toolkit Components.
We could grab the logs from the specific pod, pass the logs into a json processor and show it to the user.
The API could be something like:
flux log (helm|source|kustomize|notification) --watch
The text was updated successfully, but these errors were encountered: