mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Merge pull request #99823 from navidshaikh/pr/slog-k-utils
Migrate pkg/kubelet/util to structured logging
This commit is contained in:
commit
b4f351329e
@ -313,7 +313,7 @@ func (c *objectCache) Get(namespace, name string) (runtime.Object, error) {
|
|||||||
if c.isImmutable(object) {
|
if c.isImmutable(object) {
|
||||||
item.setImmutable()
|
item.setImmutable()
|
||||||
if item.stop() {
|
if item.stop() {
|
||||||
klog.V(4).Infof("Stopped watching for changes of %q/%q - object is immutable", namespace, name)
|
klog.V(4).InfoS("Stopped watching for changes - object is immutable", "obj", klog.KRef(namespace, name))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return object, nil
|
return object, nil
|
||||||
|
@ -46,7 +46,7 @@ func SetNodeOwnerFunc(c clientset.Interface, nodeName string) func(lease *coordi
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
klog.Errorf("failed to get node %q when trying to set owner ref to the node lease: %v", nodeName, err)
|
klog.ErrorS(err, "Failed to get node when trying to set owner ref to the node lease", "node", klog.KRef("", nodeName))
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ func parseEndpointWithFallbackProtocol(endpoint string, fallbackProtocol string)
|
|||||||
fallbackEndpoint := fallbackProtocol + "://" + endpoint
|
fallbackEndpoint := fallbackProtocol + "://" + endpoint
|
||||||
protocol, addr, err = parseEndpoint(fallbackEndpoint)
|
protocol, addr, err = parseEndpoint(fallbackEndpoint)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
klog.Warningf("Using %q as endpoint is deprecated, please consider using full url format %q.", endpoint, fallbackEndpoint)
|
klog.InfoS("Using this endpoint is deprecated, please consider using full URL format", "endpoint", endpoint, "URL", fallbackEndpoint)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user