k8s.io/component-base/logs: replace klog text implementation

This replaces the klog formatting and message routing with a simpler
implementation that uses less code. The main difference is that we skip the
entire unused message routing.

Instead, the same split output streams as for JSON gets implemented in the
io.Writer implementation that gets passed to the textlogger.
This commit is contained in:
Patrick Ohly
2022-12-20 19:39:45 +01:00
parent 04b772c661
commit 8f4c9c7605
16 changed files with 305 additions and 21 deletions

View File

@@ -422,7 +422,14 @@ kind: KubeProxyConfiguration
},
Options: logsapi.FormatOptions{
JSON: logsapi.JSONOptions{
InfoBufferSize: resource.QuantityValue{Quantity: resource.MustParse("0")},
OutputRoutingOptions: logsapi.OutputRoutingOptions{
InfoBufferSize: resource.QuantityValue{Quantity: resource.MustParse("0")},
},
},
Text: logsapi.TextOptions{
OutputRoutingOptions: logsapi.OutputRoutingOptions{
InfoBufferSize: resource.QuantityValue{Quantity: resource.MustParse("0")},
},
},
},
}