From da58911306ad213e1312ac4d1dd3125c214c0527 Mon Sep 17 00:00:00 2001
From: Paul Holzinger <pholzing@redhat.com>
Date: Wed, 23 Mar 2022 18:26:36 +0100
Subject: fix podman machine start log level detection

Use logrus.IsLevelEnabled because this will cover all levels below it as
well. Currently this condition would fail for the trace log level.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
---
 pkg/machine/qemu/machine.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'pkg/machine/qemu/machine.go')

diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go
index 89451cb44..667398fdc 100644
--- a/pkg/machine/qemu/machine.go
+++ b/pkg/machine/qemu/machine.go
@@ -430,7 +430,7 @@ func (v *MachineVM) Start(name string, _ machine.StartOptions) error {
 
 	// Disable graphic window when not in debug mode
 	// Done in start, so we're not suck with the debug level we used on init
-	if logrus.GetLevel() != logrus.DebugLevel {
+	if !logrus.IsLevelEnabled(logrus.DebugLevel) {
 		cmd = append(cmd, "-display", "none")
 	}
 
-- 
cgit v1.2.3-54-g00ecf