From 0efb1e105d781b2a659b15b9e8aa33d78db35ca7 Mon Sep 17 00:00:00 2001 From: Menghan Li Date: Thu, 1 Nov 2018 14:31:10 -0700 Subject: [PATCH] binarylog: no warning if no config string is set (is empty string) (#2430) --- internal/binarylog/env_config.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/binarylog/env_config.go b/internal/binarylog/env_config.go index be6ea02cb35e..eb188eae5a3e 100644 --- a/internal/binarylog/env_config.go +++ b/internal/binarylog/env_config.go @@ -45,6 +45,9 @@ import ( // If two configs exist for one certain method or service, the one specified // later overrides the privous config. func NewLoggerFromConfigString(s string) Logger { + if s == "" { + return nil + } l := newEmptyLogger() methods := strings.Split(s, ",") for _, method := range methods {