-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
@@ -31,6 +31,10 @@ var runCommand = cli.Command{ | |||
// Right now, we need to set image manually. | |||
Required: true, | |||
}, | |||
cli.BoolFlag{ | |||
Name: "debug", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
2a629a0
to
3696de7
Compare
3696de7
to
6a63f88
Compare
@@ -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{}) { |
There was a problem hiding this comment.
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?
Hi @PugDeveloper , I carry this in #123. Sorry for late reply. Hope you don't mind! |
No description provided.