From b88f24cd1d8e9dc895a67e5de83aa15b75cb1243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Wed, 4 Dec 2024 23:26:58 +0100 Subject: [PATCH] promslog: always lowercase log level from CLI (#728) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Otto Kröpke --- promslog/slog.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/promslog/slog.go b/promslog/slog.go index c20c2f41..6e8fbabc 100644 --- a/promslog/slog.go +++ b/promslog/slog.go @@ -118,7 +118,7 @@ func (l *AllowedLevel) Set(s string) error { l.lvl = &slog.LevelVar{} } - switch s { + switch strings.ToLower(s) { case "debug": l.lvl.Set(slog.LevelDebug) callerAddFunc = true