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

chore: feature flag to enable switching between logger for libaries #3161

Merged
merged 4 commits into from
Oct 29, 2024

Conversation

AustinAbro321
Copy link
Contributor

Description

When a library takes in a logger we currently have a way for it to respect the logging feature flag as we move to slog. This PR adds functionality to enable that

Related Issue

Relates to #2576

Checklist before merging

Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
Copy link

netlify bot commented Oct 29, 2024

Deploy Preview for zarf-docs canceled.

Name Link
🔨 Latest commit 9ec0f9c
🔍 Latest deploy log https://app.netlify.com/sites/zarf-docs/deploys/672123f0f763b50008f40d67

@AustinAbro321 AustinAbro321 marked this pull request as ready for review October 29, 2024 17:16
@AustinAbro321 AustinAbro321 requested review from a team as code owners October 29, 2024 17:16
Copy link

codecov bot commented Oct 29, 2024

Codecov Report

Attention: Patch coverage is 42.10526% with 11 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pkg/logger/logger.go 58.33% 4 Missing and 1 partial ⚠️
src/internal/packager/template/template.go 25.00% 2 Missing and 1 partial ⚠️
src/cmd/root.go 0.00% 2 Missing ⚠️
src/internal/packager/images/pull.go 0.00% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/internal/packager/images/pull.go 44.14% <0.00%> (-0.14%) ⬇️
src/cmd/root.go 0.00% <0.00%> (ø)
src/internal/packager/template/template.go 62.22% <25.00%> (-2.15%) ⬇️
src/pkg/logger/logger.go 69.31% <58.33%> (-1.74%) ⬇️

mkcp
mkcp previously approved these changes Oct 29, 2024
Copy link
Contributor

@mkcp mkcp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good cleanup. Enabled() is simple for callers so imo that turned out well. One non-blocking nit about elses - lmk if you revise and I'll re-approve asap. No need to use the suggestion commit either, it always gets weird around DCO.

src/internal/packager/template/template.go Outdated Show resolved Hide resolved
src/pkg/logger/logger.go Show resolved Hide resolved
src/pkg/logger/logger.go Show resolved Hide resolved
Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
Copy link
Contributor

@mkcp mkcp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AustinAbro321 AustinAbro321 added this pull request to the merge queue Oct 29, 2024
Merged via the queue into main with commit 4d78738 Oct 29, 2024
26 checks passed
@AustinAbro321 AustinAbro321 deleted the logger-enabled branch October 29, 2024 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants