Discussion about dropping klog legacy features. What logging features should be supported?

29 views
Skip to first unread message

Marek Siarkowicz

unread,
Jun 21, 2021, 2:48:05 PMJun 21
to kuberne...@googlegroups.com, kubernetes-sig-instrumentation, kubernetes-wg-st...@googlegroups.com
Hey kubernetes-dev, sig-instrumentation, wg-structured-logging

In v1.19 Kubernetes added an alternative to klog output format, the JSON logging format. It's faster and easier to parse. However it was lacking some klog features that we got used to, it didn't add the information about source code that called the logger and only supported one (-v) out of 13 klog configuration flags. To make user experience comparable with klog, we specified  that reaching feature parity should be a Beta requirement.

In v1.22 JSON formats will include the source code information under the "caller" key, but we can't implement support for all of the klog flags. Implementing features that are not actively utilized by community doesn't make sense, therefore I send this email to ask the community about what features are important to you.

Within the Structured Logging working group we have already started a discussion about what to do with the legacy klog flags. I have created a proposal to deprecate and in future hide subset of klog flags from K8s core components (kube-apiserver, kube-scheduler, kube-controller-manager, kubelet). We scope the changes to only those components a so as not to impact the broader klog community. As a result we would remove features like:
* Writing logs to files
* Log file rotation
* Adding/Removing klog headers
* Adding stacktrace at the specific location

I'm open to discussion about keeping some of those features, but most of them seem klog specific or do not comply with best logging practices like writing to stdout/stderr.

Please let me know what you think on the issue https://github.com/kubernetes/kubernetes/issues/99270. Please let me know if this is worthy of a dedicated KEP.

Thanks

Marek Siarkowicz

unread,
Jun 28, 2021, 5:05:40 AMJun 28
to kuberne...@googlegroups.com, kubernetes-sig-instrumentation, kubernetes-sig-architecture, kubernetes-wg-st...@googlegroups.com
+kubernetes-sig-architecture CC to bring the discussion to SIG Arch
Reply all
Reply to author
Forward
0 new messages