From 77caf0ee41046d32c53df0108c4eb41440b357b8 Mon Sep 17 00:00:00 2001 From: Erik Godding Boye Date: Tue, 3 Sep 2024 13:20:07 +0200 Subject: [PATCH] better errors --- pkg/zap/zap.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/zap/zap.go b/pkg/zap/zap.go index 1ff5e1f..278a1e0 100644 --- a/pkg/zap/zap.go +++ b/pkg/zap/zap.go @@ -141,11 +141,11 @@ func stringToLevelEnablerHookFunc() mapstructure.DecodeHookFuncType { // Level string not successfully parsed as a valid zap level string. Trying to parse int level. iVal, err := strconv.Atoi(sVal) if err != nil { - return nil, fmt.Errorf("invalid log logLevel \"%s\"", val) + return nil, fmt.Errorf("invalid level value \"%s\"", val) } if iVal < int(zap.DebugLevel) || iVal > int(zap.FatalLevel) { - return nil, fmt.Errorf("invalid log logLevel \"%s\"", val) + return nil, fmt.Errorf("invalid level value \"%s\"", val) } // #nosec G115