kubeflow / common

Common APIs and libraries shared by other Kubeflow operator repositories.
Apache License 2.0
51 stars 73 forks source link

Unify structured logging for common operator #143

Open Jeffwan opened 3 years ago

Jeffwan commented 3 years ago

All of below have reference in different operators. This makes logs very messy and we need to consolidate to one common utility

  1. "github.com/sirupsen/logrus"
  2. "github.com/go-logr/logr" - default logger interface used by reconciler generated by kubebuilder.
  3. "sigs.k8s.io/controller-runtime/pkg/log" - implementation of "go-logr/logr"
  4. https://github.com/kubeflow/common/blob/master/pkg/util/logger.go - use logrus underneath
  5. "k8s.io/klog"
PatrickXYS commented 3 years ago

Do we have any preference in those log libraries? @Jeffwan

Jeffwan commented 3 years ago

@PatrickXYS We do prefer json logging. No big preference. The challenge is different components use different solutions

Let's see if we can consolidate into one