mirror of
https://github.com/navidrome/navidrome.git
synced 2025-06-14 14:22:28 +03:00
Respect EnableLogRedacting config when pretty printing configuration
This commit is contained in:
parent
7b05c49215
commit
ead2095dd0
@ -117,8 +117,13 @@ func Load() {
|
|||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Print current configuration if log level is Debug
|
||||||
if log.CurrentLevel() >= log.LevelDebug {
|
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
|
// Call init hooks
|
||||||
|
Loading…
x
Reference in New Issue
Block a user