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

Improve the log for agent start & shutdown #352

Open
zhiying-lin opened this issue Jan 9, 2023 · 0 comments
Open

Improve the log for agent start & shutdown #352

zhiying-lin opened this issue Jan 9, 2023 · 0 comments

Comments

@zhiying-lin
Copy link
Contributor

The current log level for shutdown/starting hub/member managers is using v(3).

https://github.com/Azure/fleet/blob/main/cmd/memberagent/main.go#L220

In the production, it's not easy to tell whether the manager has been started/shutdown based on the agent log.
It's better to change the log level to 1.

https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md#what-method-to-use

klog.V(1).InfoS - A reasonable default log level if you don't want verbosity.
Information about config (listening on X, watching Y)
Errors that repeat frequently that relate to conditions that can be corrected (pod detected as unhealthy)

It's better to print the flag value for the agent configurations and it could be helpful in the production.
similar to https://github.com/Azure/fleet-networking/blob/main/cmd/mcs-controller-manager/main.go#L83

	flag.VisitAll(func(f *flag.Flag) {
		klog.InfoS("flag:", "name", f.Name, "value", f.Value)
	})
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

No branches or pull requests

1 participant