mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 00:30:54 +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
|
// Global formatter overrides the default set formatter
|
||||||
// but not adapter specific formatters set with logs.SetLoggerWithOpts()
|
// but not adapter specific formatters set with logs.SetLoggerWithOpts()
|
||||||
if bl.globalFormatter != nil {
|
if bl.globalFormatter != nil {
|
||||||
err = lg.Init(config)
|
err = lg.Init(config, common.SimpleKV{Key: "formatter", Value: bl.globalFormatter})
|
||||||
} else {
|
} else {
|
||||||
err = lg.Init(config)
|
err = lg.Init(config)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user