From cbedaf90fed6b236c88cab2ba669499859f7a494 Mon Sep 17 00:00:00 2001 From: Jille Timmermans Date: Wed, 13 Jul 2022 18:55:27 +0200 Subject: [PATCH] Improve error message for incorrect values of ETCD_CLIENT_DEBUG Signed-off-by: Jille Timmermans --- client/v3/logger.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/v3/logger.go b/client/v3/logger.go index ecac42730f6..eaa35f2d3ac 100644 --- a/client/v3/logger.go +++ b/client/v3/logger.go @@ -51,8 +51,8 @@ func etcdClientDebugLevel() zapcore.Level { return zapcore.InfoLevel } var l zapcore.Level - if err := l.Set(envLevel); err == nil { - log.Printf("Deprecated env ETCD_CLIENT_DEBUG value. Using default level: 'info'") + if err := l.Set(envLevel); err != nil { + log.Printf("Invalid value for environment variable 'ETCD_CLIENT_DEBUG'. Using default level: 'info'") return zapcore.InfoLevel } return l