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

Set verbosity level in logging statements #282

Open
jsanda opened this issue Jan 10, 2022 · 3 comments
Open

Set verbosity level in logging statements #282

jsanda opened this issue Jan 10, 2022 · 3 comments

Comments

@jsanda
Copy link
Contributor

jsanda commented Jan 10, 2022

What is missing?
Most (maybe all) logging throughout the operator are done with logger.Info() and logger.Error(). A verbosity should be set for each statement, e.g., logger.V(5).Info().

Why do we need it?
As the code base has grown there is a lot more logging output from the operator. A lot of the log statements are really only needed during dev/testing or debugging. By setting verbosity levels we give the user the ability to configure and tune logging output.

This is critical from a usability standpoint IMO.

It probably makes sense to configure the logging level via the operator configuration which means we need to do #63.

Environment

  • K8ssandra Operator version:
v1.0.0-alpha.2

┆Issue is synchronized with this Jira Story by Unito
┆Issue Number: K8OP-120

@sync-by-unito sync-by-unito bot changed the title Set verbosity level in logging statements K8SSAND-1152 ⁃ Set verbosity level in logging statements Jan 10, 2022
@burmanm
Copy link
Contributor

burmanm commented Jan 11, 2022

Kubernetes recommends max V(1) for debugging, not deeper.

@jsanda
Copy link
Contributor Author

jsanda commented Jan 11, 2022

Can you provide a reference?

So nothing greater than V(1)?

@jsanda
Copy link
Contributor Author

jsanda commented Jan 11, 2022

Here are logging guidelines for kubernetes dev docs https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md. It suggests V(4) for debug and a default level of V(2).

@adejanovski adejanovski moved this to To Groom in K8ssandra Nov 8, 2022
@sync-by-unito sync-by-unito bot changed the title K8SSAND-1152 ⁃ Set verbosity level in logging statements Set verbosity level in logging statements Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: No status
Development

No branches or pull requests

2 participants