-
Notifications
You must be signed in to change notification settings - Fork 173
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
zarf command line execution error logging and log file readability #890
Comments
That's interesting, cat on mac zsh (iterm / vscode) both print the color data as well, can you clarify what OS/terminal/shell you're using? |
In this case I believe the offender is |
While there may be different tools that makes this better, I believe this is a good enough use case to push forward implementation of a '--no-color' flag (or something to that effect). Likely not super high priority, but this will definitely show up again, like in a CI pipeline where the choice of tool isn't very flexible |
Yeah we can probably look at that, but for FWIW, most CI systems do support ansi colors (I don't know of any that don't). I missed the fact he was using
But I'm evil and like to use GUIs too... |
Linux would set you right @jeff-mccoy 😈 |
I just like pretty things, I'm sorry I can't help it. I started using Linux in 1996 and used to live by a terminal only, but I guess I'm just too attracted to pretty interfaces... |
You should give the Gnome 40 series a shot sometime. GTK4 and libadwatia are starting to bring the shiny to linux now (though admittedly there are some rough edges still, particularly for phones (yes really https://blogs.gnome.org/shell-dev/2022/09/09/gnome-shell-on-mobile-an-update/) and tablets). |
I got the same results when using Thanks for looking into it. |
Reopening this issue since I think it is worth some docs on why we did this, and how to easily view Zarf logs. |
Lines with color even with this change:
OR with
I'm not sure how or if to handle these log lines. |
## Description Add --no-color option to disable color output ## Related Issue Fixes #890 ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) ## Checklist before merging - [X] Test, docs, adr added or updated as needed - [X] [Contributor Guide Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow) followed --------- Co-authored-by: Wayne Starr <[email protected]>
Is your feature request related to a problem? Please describe.
When executing zarf package deploy from a command line, the erroring reporting seems inconsistent.
Example 1:
A deployment.yaml is missing spec.selector.
zarf output:
Example 2:
A deployment.yaml is missing spec.template.metadata
zarf output:
In both scenarios, when trying to review/troubleshoot using the associated log file with linux tools like vi, nano or simply cat the log file piped to less (cat /var/folders/bh/l8qqtz8x57j5vjd8sd33sxt40000gn/T/zarf-2022-10-12-08-46-18-3119412142.log | less) the log file is difficult to read due to the color flags.
Describe the solution you'd like
For example 1, similar logging output to example 2.
The ability to use basic linux tools to easily review and examine the log file for troubleshooting.
Describe alternatives you've considered
Manually testing yaml files before building a zarf package (i.e. kubectl apply -f deployment.yaml) to avoid the "WARNING Unable to complete helm chart install/update" messages and application deployment failure.
Don't currently have a good alternative to viewing the logs. I can investigate other editing tools.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: