Set verbosity level in logging statements
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
Kubernetes recommends max V(1) for debugging, not deeper.
Can you provide a reference?
So nothing greater than V(1)?
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).