Migrate pkg/kubelet/config to structured logging
Co-authored-by: Shubheksha <shubheksha@users.noreply.github.com> Co-authored-by: Marek Siarkowicz <marek.siarkowicz@protonmail.com> Co-authored-by: Elana Hashman <ehashman@users.noreply.github.com>
This commit is contained in:
@@ -57,7 +57,7 @@ func (s *sourceFile) startWatch() {
|
||||
}
|
||||
|
||||
if err := s.doWatch(); err != nil {
|
||||
klog.Errorf("Unable to read config path %q: %v", s.path, err)
|
||||
klog.ErrorS(err, "Unable to read config path", "path", s.path)
|
||||
if _, retryable := err.(*retryableError); !retryable {
|
||||
backOff.Next(backOffID, time.Now())
|
||||
}
|
||||
@@ -102,7 +102,7 @@ func (s *sourceFile) doWatch() error {
|
||||
func (s *sourceFile) produceWatchEvent(e *fsnotify.Event) error {
|
||||
// Ignore file start with dots
|
||||
if strings.HasPrefix(filepath.Base(e.Name), ".") {
|
||||
klog.V(4).Infof("Ignored pod manifest: %s, because it starts with dots", e.Name)
|
||||
klog.V(4).InfoS("Ignored pod manifest, because it starts with dots", "eventName", e.Name)
|
||||
return nil
|
||||
}
|
||||
var eventType podEventType
|
||||
|
Reference in New Issue
Block a user