Skip to content
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

feat: logger poc #3101

Closed
wants to merge 1 commit into from
Closed

feat: logger poc #3101

wants to merge 1 commit into from

Conversation

mkcp
Copy link
Contributor

@mkcp mkcp commented Oct 15, 2024

Description

Adds slog-based pkg/logger and creates an instance on rootCmd's persistent pre-Run. Also adds it to the root Ctx and sets the slog global with it partially configured. Still needs to support --log-format="".

Also, this partially adds zarf say and deletes the logo prints in zarf and zarf init, and mucks around in cmd a bit to clean things up. zarf say still needs some help text. Also the help text for --log-level="..." needs to get updated for the new slog levels.

Related Issue

Fixes #

Relates to #

Checklist before merging

…otCmd. migrate zarf logo to 'zarf say'

Signed-off-by: Kit Patella <kit@defenseunicorns.com>
@mkcp mkcp self-assigned this Oct 15, 2024
Copy link

netlify bot commented Oct 15, 2024

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit 179743b
🔍 Latest deploy log https://app.netlify.com/sites/zarf-docs/deploys/670ef7ffa4986c0009ea2af1

Copy link

codecov bot commented Oct 15, 2024

Codecov Report

Attention: Patch coverage is 18.18182% with 117 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/cmd/root.go 0.00% 76 Missing ⚠️
src/cmd/say/say.go 0.00% 12 Missing ⚠️
src/pkg/logger/logger.go 72.22% 10 Missing ⚠️
src/cmd/package.go 0.00% 9 Missing ⚠️
src/cmd/cmd.go 0.00% 6 Missing ⚠️
src/cmd/dev.go 0.00% 3 Missing ⚠️
src/cmd/common/viper.go 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/cmd/initialize.go 0.00% <ø> (ø)
src/cmd/common/viper.go 0.00% <0.00%> (ø)
src/cmd/dev.go 0.00% <0.00%> (ø)
src/cmd/cmd.go 0.00% <0.00%> (ø)
src/cmd/package.go 0.00% <0.00%> (ø)
src/pkg/logger/logger.go 72.22% <72.22%> (ø)
src/cmd/say/say.go 0.00% <0.00%> (ø)
src/cmd/root.go 0.00% <0.00%> (ø)

@mkcp mkcp mentioned this pull request Oct 16, 2024
2 tasks
@mkcp mkcp closed this Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant