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

[helmcli] Add support to show debug log #74

Closed
wants to merge 1 commit into from
Closed

Conversation

PugDeveloper
Copy link

No description provided.

@PugDeveloper PugDeveloper requested a review from fuweid January 30, 2024 05:06
@PugDeveloper PugDeveloper linked an issue Jan 30, 2024 that may be closed by this pull request
@@ -31,6 +31,10 @@ var runCommand = cli.Command{
// Right now, we need to set image manually.
Required: true,
},
cli.BoolFlag{
Name: "debug",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we can consider to remove debug flag here.
Since you have introduced klog in project, we can just use level 5 to show detail. What do you think?

Copy link
Author

Choose a reason for hiding this comment

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

I think that makes sense to use klog as the default debuglogger. I can close this PR unless you think we need to use this debugLog elsewhere?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry, I miss this comment.

We still need this PR because we need to implement log to replace noopLog.
I was thinking that we don't need to introduce debug flag but introduce new log function with klog. So that we can use -v xxx to enable debug log.

@PugDeveloper PugDeveloper force-pushed the helmdebugLog branch 6 times, most recently from 2a629a0 to 3696de7 Compare March 11, 2024 22:16
@@ -26,3 +26,8 @@ var Command = cli.Command{
statusCommand,
},
}

// debuLog function to log messages using klog.
func debugLog(level klog.Level, format string, args ...interface{}) {
Copy link
Author

@PugDeveloper PugDeveloper Mar 11, 2024

Choose a reason for hiding this comment

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

would you put the function in the root? and would it be like this?

@fuweid
Copy link
Collaborator

fuweid commented May 13, 2024

Hi @PugDeveloper , I carry this in #123. Sorry for late reply. Hope you don't mind!

@fuweid fuweid closed this May 13, 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.

[helmcli] support to show debug log
2 participants