From 836be7ab9a724612c88cbda15e903802ce554ab5 Mon Sep 17 00:00:00 2001 From: Back Date: Wed, 28 Sep 2016 16:20:41 +0800 Subject: [PATCH] fix to advice in #2187 Clear BConfig.Log.Outputs's default "console" while user has set "LogOutputs" in config file. --- config.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config.go b/config.go index a4f40611..3cf89583 100644 --- a/config.go +++ b/config.go @@ -294,6 +294,10 @@ func assignConfig(ac config.Configer) error { } if lo := ac.String("LogOutputs"); lo != "" { + // if lo is not nil or empty + // means user has set his own LogOutputs + // clear the default setting to BConfig.Log.Outputs + BConfig.Log.Outputs = make(map[string]string) los := strings.Split(lo, ";") for _, v := range los { if logType2Config := strings.SplitN(v, ",", 2); len(logType2Config) == 2 {