1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-23 04:40:49 +00:00

fix to advice in #2187

Clear BConfig.Log.Outputs's default "console" while user has set "LogOutputs" in config file.
This commit is contained in:
Back 2016-09-28 16:20:41 +08:00 committed by GitHub
parent bba04dd864
commit 836be7ab9a

View File

@ -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 {