mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-05 18:05:19 +02:00
use level config in main section when subsection not set level (#15176)
in previouse if a log subsetcion not set level it will use ``info`` as default value. this pr will make default value (``[log] -> LEVEL``) useable. example config: ```INI [log] MODE = console LEVEL = Trace [log.console] LEVEL = STDERR = false ``` previous result: ```JSON // console: { "level": "info", ................... } ``` after change: ```JSON // console: { "level": "track", ................... } ``` Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
parent
82d1a7fb17
commit
3273fb9af1
3 changed files with 8 additions and 9 deletions
|
@ -373,7 +373,7 @@ func InstallPost(ctx *context.Context) {
|
|||
cfg.Section("session").Key("PROVIDER").SetValue("file")
|
||||
|
||||
cfg.Section("log").Key("MODE").SetValue("console")
|
||||
cfg.Section("log").Key("LEVEL").SetValue(setting.LogLevel)
|
||||
cfg.Section("log").Key("LEVEL").SetValue(setting.LogLevel.String())
|
||||
cfg.Section("log").Key("ROOT_PATH").SetValue(form.LogRootPath)
|
||||
cfg.Section("log").Key("ROUTER").SetValue("console")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue