1
0
mirror of https://github.com/astaxie/beego.git synced 2024-10-31 23:00:55 +00:00

logAdapter is more readable

This commit is contained in:
JessonChan 2019-03-12 13:20:13 +08:00
parent c0fae547e9
commit 7693502aaa

View File

@ -187,12 +187,12 @@ func (bl *BeeLogger) setLogger(adapterName string, configs ...string) error {
}
}
log, ok := adapters[adapterName]
logAdapter, ok := adapters[adapterName]
if !ok {
return fmt.Errorf("logs: unknown adaptername %q (forgotten Register?)", adapterName)
}
lg := log()
lg := logAdapter()
err := lg.Init(config)
if err != nil {
fmt.Fprintln(os.Stderr, "logs.BeeLogger.SetLogger: "+err.Error())