We are wrapping logs in a r.debug flag.
Example:
if r.Debug {
log.Info("Initial desired spec", "spec", desiredSpec.SensitiveValuesMasked())
}
We should be setting up the log level based on that debug flag on time in the main.go
So update is needed here:
logger := zap.New(zap.UseFlagOptions(&opts))
ctrl.SetLogger(logger)
The logging can be greatly simplified and we don't need to pass the debug flag around if we just do this proper.
By default we should log info logs, and then if debug is set, we should be logging info and debug.
We are wrapping logs in a r.debug flag.
Example:
We should be setting up the log level based on that debug flag on time in the main.go
So update is needed here:
The logging can be greatly simplified and we don't need to pass the debug flag around if we just do this proper.
By default we should log info logs, and then if debug is set, we should be logging info and debug.