From 76f04485b4067e7593e8b0863129f2bb3b9034f3 Mon Sep 17 00:00:00 2001 From: Jiahao Huang Date: Fri, 21 Jun 2019 21:11:37 +0800 Subject: [PATCH] Revert "drainer: Log version info before other logs, fix #242 (#638)" This reverts commit 62c5a9e523533414899de18677bfce30b52cd21b. --- cmd/drainer/main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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)