Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog - klog as explicit InitFlags() so we add them as necessary - we update the other repositories that we vendor that made a similar change from glog to klog * github.com/kubernetes/repo-infra * k8s.io/gengo/ * k8s.io/kube-openapi/ * github.com/google/cadvisor - Entirely remove all references to glog - Fix some tests by explicit InitFlags in their init() methods Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
This commit is contained in:
@@ -26,8 +26,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"golang.org/x/exp/inotify"
|
||||
"k8s.io/klog"
|
||||
|
||||
"k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/util/wait"
|
||||
@@ -58,7 +58,7 @@ func (s *sourceFile) startWatch() {
|
||||
}
|
||||
|
||||
if err := s.doWatch(); err != nil {
|
||||
glog.Errorf("Unable to read config path %q: %v", s.path, err)
|
||||
klog.Errorf("Unable to read config path %q: %v", s.path, err)
|
||||
if _, retryable := err.(*retryableError); !retryable {
|
||||
backOff.Next(backOffId, time.Now())
|
||||
}
|
||||
@@ -103,13 +103,13 @@ func (s *sourceFile) doWatch() error {
|
||||
func (s *sourceFile) produceWatchEvent(e *inotify.Event) error {
|
||||
// Ignore file start with dots
|
||||
if strings.HasPrefix(filepath.Base(e.Name), ".") {
|
||||
glog.V(4).Infof("Ignored pod manifest: %s, because it starts with dots", e.Name)
|
||||
klog.V(4).Infof("Ignored pod manifest: %s, because it starts with dots", e.Name)
|
||||
return nil
|
||||
}
|
||||
var eventType podEventType
|
||||
switch {
|
||||
case (e.Mask & inotify.IN_ISDIR) > 0:
|
||||
glog.Errorf("Not recursing into manifest path %q", s.path)
|
||||
klog.Errorf("Not recursing into manifest path %q", s.path)
|
||||
return nil
|
||||
case (e.Mask & inotify.IN_CREATE) > 0:
|
||||
eventType = podAdd
|
||||
|
Reference in New Issue
Block a user