From 019daa7cf39ee2370ff5c6a5b0d4eb9bcbaccf11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Sun, 1 Dec 2024 09:49:54 +0100 Subject: [PATCH] promslog: always lowercase log level from CLI 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 1677605a..a70eb6a4 100644 --- a/promslog/slog.go +++ b/promslog/slog.go @@ -115,7 +115,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