mirror of
https://github.com/astaxie/beego.git
synced 2024-12-28 12:45:47 +00:00
Add global logging override
This commit is contained in:
parent
6684924e99
commit
0189e6329a
@ -213,7 +213,7 @@ func (bl *BeeLogger) setLogger(adapterName string, configs ...string) error {
|
||||
// Global formatter overrides the default set formatter
|
||||
// but not adapter specific formatters set with logs.SetLoggerWithOpts()
|
||||
if bl.globalFormatter != nil {
|
||||
err = lg.Init(config)
|
||||
err = lg.Init(config, common.SimpleKV{Key: "formatter", Value: bl.globalFormatter})
|
||||
} else {
|
||||
err = lg.Init(config)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user