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() {
|
func logAllFlags() {
|
||||||
Infof("build version: %s", buildinfo.Version)
|
Infof("build version: %s", buildinfo.Version)
|
||||||
Infof("command line flags")
|
Infof("command-line flags")
|
||||||
flag.Visit(func(f *flag.Flag) {
|
flag.Visit(func(f *flag.Flag) {
|
||||||
lname := strings.ToLower(f.Name)
|
lname := strings.ToLower(f.Name)
|
||||||
value := f.Value.String()
|
value := f.Value.String()
|
||||||
if flagutil.IsSecretFlag(lname) {
|
if flagutil.IsSecretFlag(lname) {
|
||||||
value = "secret"
|
value = "secret"
|
||||||
}
|
}
|
||||||
Infof("flag %q=%q", f.Name, value)
|
Infof(" -%s=%q", f.Name, value)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue