mirror of
https://github.com/navidrome/navidrome.git
synced 2026-02-02 06:24:14 +00:00
Respect EnableLogRedacting config when pretty printing configuration
This commit is contained in:
parent
daa6ccdef8
commit
6dbedcfb1d
@ -128,8 +128,13 @@ func Load() {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Print current configuration if log level is Debug
|
||||
if log.CurrentLevel() >= log.LevelDebug {
|
||||
fmt.Println(log.Redact(pretty.Sprintf("Loaded configuration from '%s': %# v", Server.ConfigFile, Server)))
|
||||
prettyConf := pretty.Sprintf("Loaded configuration from '%s': %# v", Server.ConfigFile, Server)
|
||||
if Server.EnableLogRedacting {
|
||||
prettyConf = log.Redact(prettyConf)
|
||||
}
|
||||
fmt.Println(prettyConf)
|
||||
}
|
||||
|
||||
// Call init hooks
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user