From d02cb2ddc014b6ebf14aea06254fb8d85a548e07 Mon Sep 17 00:00:00 2001
From: Sascha Grunert <sgrunert@suse.com>
Date: Tue, 25 Aug 2020 21:48:18 +0200
Subject: Fix log level case regression

With previous versions of Podman (like v1.9.2) it was always possible to
specify the log level in any case, for example `INFO`. This behavior has
silently changed, where the `--log-level` flag only accepts lower case
levels. This commit re-enables the old behavior and adds an e2e test for
it.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
---
 cmd/podman/root.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'cmd/podman')

diff --git a/cmd/podman/root.go b/cmd/podman/root.go
index 8f77e5893..749a5fbe7 100644
--- a/cmd/podman/root.go
+++ b/cmd/podman/root.go
@@ -226,7 +226,7 @@ func persistentPostRunE(cmd *cobra.Command, args []string) error {
 func loggingHook() {
 	var found bool
 	for _, l := range logLevels {
-		if l == logLevel {
+		if l == strings.ToLower(logLevel) {
 			found = true
 			break
 		}
-- 
cgit v1.2.3-54-g00ecf