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

fix: verbose log level #67

Merged
merged 1 commit into from
May 9, 2024
Merged

fix: verbose log level #67

merged 1 commit into from
May 9, 2024

Conversation

becojo
Copy link
Contributor

@becojo becojo commented May 8, 2024

cmd.Verbose isn't set yet in the Execute function it seems and verbose logging can't be enabled. I moved the call to set the log level after the config file parsing in initConfig and it worked 🤷 I'm not sure if there is somewhere else the logger should be initialized instead. Moved log initialization into the PersistentPreRun hook.

@becojo becojo requested a review from a team as a code owner May 8, 2024 19:44
@SUSTAPLE117
Copy link
Contributor

SUSTAPLE117 commented May 8, 2024

@becojo yeah I see what is going on here. InitConfig is called before each command and has the flags values set to what was passed

@becojo becojo force-pushed the fix-verbose-logging branch from 7f55223 to 504f2b0 Compare May 8, 2024 19:57
@becojo becojo force-pushed the fix-verbose-logging branch from 504f2b0 to 3705dc0 Compare May 8, 2024 19:57
@SUSTAPLE117 SUSTAPLE117 merged commit 3b7e231 into main May 9, 2024
8 checks passed
@SUSTAPLE117 SUSTAPLE117 deleted the fix-verbose-logging branch May 9, 2024 13:44
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.

2 participants