common
common copied to clipboard
Unify structured logging for common operator
All of below have reference in different operators. This makes logs very messy and we need to consolidate to one common utility
- "github.com/sirupsen/logrus"
- "github.com/go-logr/logr" - default logger interface used by reconciler generated by kubebuilder.
- "sigs.k8s.io/controller-runtime/pkg/log" - implementation of "go-logr/logr"
- https://github.com/kubeflow/common/blob/master/pkg/util/logger.go - use logrus underneath
- "k8s.io/klog"
Do we have any preference in those log libraries? @Jeffwan
@PatrickXYS We do prefer json logging. No big preference. The challenge is different components use different solutions
- kubebuilder
- logrus
Let's see if we can consolidate into one