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:
parent
c0fae547e9
commit
7693502aaa
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user