mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-22 16:36:27 +01:00
23 lines
461 B
Go
23 lines
461 B
Go
package logger
|
|
|
|
import (
|
|
"flag"
|
|
"strings"
|
|
|
|
"github.com/VictoriaMetrics/VictoriaMetrics/lib/buildinfo"
|
|
"github.com/VictoriaMetrics/VictoriaMetrics/lib/flagutil"
|
|
)
|
|
|
|
func logAllFlags() {
|
|
Infof("build version: %s", buildinfo.Version)
|
|
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(" -%s=%q", f.Name, value)
|
|
})
|
|
}
|