Merge pull request #469 from don-philipe/Print-version-to-stdout

Print version, help etc to stdout
This commit is contained in:
Matthias Rampke 2022-09-22 23:22:24 +01:00 committed by GitHub
commit a92aa4556e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -265,6 +265,7 @@ func main() {
promlogConfig := &promlog.Config{}
flag.AddFlags(kingpin.CommandLine, promlogConfig)
kingpin.Version(version.Print("statsd_exporter"))
kingpin.CommandLine.UsageWriter(os.Stdout)
kingpin.HelpFlag.Short('h')
kingpin.Parse()
logger := promlog.New(promlogConfig)