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

add back flag for kubernetes log level in CLI #4093

Closed
jessesuen opened this issue Sep 22, 2020 · 5 comments · Fixed by #4100
Closed

add back flag for kubernetes log level in CLI #4093

jessesuen opened this issue Sep 22, 2020 · 5 comments · Fixed by #4100
Assignees
Labels
type/bug type/regression Regression from previous behavior (a specific type of bug)
Milestone

Comments

@jessesuen
Copy link
Member

Summary

We used to have a --gloglevel in argo cli which would translate to glog (now klog) levels. This was useful for debugging kubernetes payloads. It got removed somehow so we should add it back.


Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

@alexec alexec added the type/regression Regression from previous behavior (a specific type of bug) label Sep 22, 2020
@alexec alexec added this to the v2.11 milestone Sep 22, 2020
@alexec
Copy link
Contributor

alexec commented Sep 22, 2020

Can I suggest we enable this with --loglevel DEBUG or -v? I did not know about this flag and I would have used it all the time if I did.

@alexec
Copy link
Contributor

alexec commented Sep 22, 2020

Caused by #2814?

@alexec
Copy link
Contributor

alexec commented Sep 22, 2020

	// global log level
	var logLevel string
	var glogLevel int
	var verbose bool
	command.PersistentPreRun = func(cmd *cobra.Command, args []string) {
		if verbose {
			logLevel = "debug"
			glogLevel = 9
		}
		cli.SetLogLevel(logLevel)
		cli.SetGLogLevel(glogLevel)
		log.WithField("version", argo.GetVersion()).Debug("CLI version")
	}
	command.PersistentFlags().StringVar(&logLevel, "loglevel", "info", "Set the logging level. One of: debug|info|warn|error")
	command.PersistentFlags().IntVar(&glogLevel, "gloglevel", 0, "Set the logging level. One of: debug|info|warn|error")
	command.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "Enabled verbose logging, i.e. --loglevel debug")

@alexec
Copy link
Contributor

alexec commented Sep 22, 2020

It got removed somehow so we should add it back.

Because there was not tests? ;)

@alexec
Copy link
Contributor

alexec commented Sep 24, 2020

Will come in v2.11.1

@alexec alexec closed this as completed Sep 24, 2020
alexcapras pushed a commit to alexcapras/argo that referenced this issue Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug type/regression Regression from previous behavior (a specific type of bug)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants