Allow log.xxx.default to set logging settings for the default logger only (#11292)
* Allow log.xxx.default to set logging settings for the default logger only Signed-off-by: Andrew Thornton <art27@cantab.net> * Update modules/setting/log.go * as per @silverwind add some documentation Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
1d54479585
commit
0052d788da
2 changed files with 18 additions and 4 deletions
|
@ -261,9 +261,12 @@ func newLogService() {
|
|||
continue
|
||||
}
|
||||
|
||||
sec, err := Cfg.GetSection("log." + name)
|
||||
sec, err := Cfg.GetSection("log." + name + ".default")
|
||||
if err != nil {
|
||||
sec, _ = Cfg.NewSection("log." + name)
|
||||
sec, err = Cfg.GetSection("log." + name)
|
||||
if err != nil {
|
||||
sec, _ = Cfg.NewSection("log." + name)
|
||||
}
|
||||
}
|
||||
|
||||
provider, config, levelName := generateLogConfig(sec, name, options)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue