Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow log.xxx.default to set logging settings for the default logger only #11292

Merged
merged 6 commits into from
May 16, 2020
Next Next commit
Allow log.xxx.default to set logging settings for the default logger …
…only

Signed-off-by: Andrew Thornton <[email protected]>
  • Loading branch information
zeripath committed May 4, 2020
commit 5bd94bcde20129fb1d5f3969a97d4a90d52a80af
8 changes: 6 additions & 2 deletions modules/setting/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,13 @@ func newLogService() {
continue
}

sec, err := Cfg.GetSection("log." + name)
fmt.Println(name)
zeripath marked this conversation as resolved.
Show resolved Hide resolved
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)
Expand Down