mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 13:10:54 +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:
parent
bba04dd864
commit
836be7ab9a
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user