mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/logger: prettify logging the defined command-line flags
This commit is contained in:
parent
ebd59e17df
commit
9fa6b25fb2
1 changed files with 2 additions and 2 deletions
|
@ -10,13 +10,13 @@ import (
|
|||
|
||||
func logAllFlags() {
|
||||
Infof("build version: %s", buildinfo.Version)
|
||||
Infof("command line flags")
|
||||
Infof("command-line flags")
|
||||
flag.Visit(func(f *flag.Flag) {
|
||||
lname := strings.ToLower(f.Name)
|
||||
value := f.Value.String()
|
||||
if flagutil.IsSecretFlag(lname) {
|
||||
value = "secret"
|
||||
}
|
||||
Infof("flag %q=%q", f.Name, value)
|
||||
Infof(" -%s=%q", f.Name, value)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue