diff --git a/cmd/drainer/main.go b/cmd/drainer/main.go index 223ebace8..f2c52285e 100644 --- a/cmd/drainer/main.go +++ b/cmd/drainer/main.go @@ -34,8 +34,6 @@ func main() { runtime.GOMAXPROCS(runtime.NumCPU()) rand.Seed(time.Now().UTC().UnixNano()) - version.PrintVersionInfo("Drainer") - cfg := drainer.NewConfig() if err := cfg.Parse(os.Args[1:]); err != nil { log.Fatal("verifying flags failed, See 'drainer --help'.", zap.Error(err)) @@ -44,6 +42,7 @@ func main() { if err := util.InitLogger(cfg.LogLevel, cfg.LogFile); err != nil { log.Fatal("Failed to initialize log", zap.Error(err)) } + version.PrintVersionInfo("Drainer") log.Info("start drainer...", zap.Reflect("config", cfg)) bs, err := drainer.NewServer(cfg)