kubernetes-sigs / node-ipam-controller

Out of tree implementation of https://github.com/kubernetes/enhancements/tree/master/keps/sig-network/2593-multiple-cluster-cidrs
Apache License 2.0
7 stars 5 forks source link

Logging in json format should be supported #6

Closed uablrek closed 5 months ago

uablrek commented 5 months ago

Structured logging and contextual-logging becomes really useful if json formatting is used.

After a discussion on slack with @pohly (again) I learned that the examples in https://github.com/kubernetes/component-base/tree/master/logs/example can be used to make programs in kubernetes-sigs conformant with other kubernetes programs regarding logging, in particular the --logging-format json cli option should be supported.

uablrek commented 5 months ago

IMO it's important that programs in kubernetes-sigs supports json logging. Another advantage is that objects included in structured logging are logged as objects in json format. Much nicer than a >500 character text with lots of back-slashes.