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
7a1a95fd3e
commit
fd1ac20760
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