revert logic change in #2851

An unrelated logic change appears to have been accidentally included
with #2851

This PR reverts the update to use EqualFold, and the discarding of the
ToLower calls so the function reads as it was when it was approved here:

8abaa39f97

Signed-off-by: Kingdon Barrett <kingdon@weave.works>
pull/2950/head
Kingdon Barrett 3 years ago
parent da9747a406
commit 203ee24007
No known key found for this signature in database
GPG Key ID: 470B0A4ACF2A4E23

@ -278,9 +278,9 @@ func logRequest(ctx context.Context, request rest.ResponseWrapper, w io.Writer)
func filterPrintLog(t *template.Template, l *ControllerLogEntry, w io.Writer) {
if logsArgs.logLevel != "" && logsArgs.logLevel != l.Level ||
logsArgs.kind != "" && strings.EqualFold(logsArgs.kind, l.Kind) ||
logsArgs.name != "" && strings.EqualFold(logsArgs.name, l.Name) ||
!logsArgs.allNamespaces && strings.EqualFold(*kubeconfigArgs.Namespace, l.Namespace) {
logsArgs.kind != "" && strings.ToLower(logsArgs.kind) != strings.ToLower(l.Kind) ||
logsArgs.name != "" && strings.ToLower(logsArgs.name) != strings.ToLower(l.Name) ||
!logsArgs.allNamespaces && strings.ToLower(*kubeconfigArgs.Namespace) != strings.ToLower(l.Namespace) {
return
}
err := t.Execute(w, l)

Loading…
Cancel
Save