From 1513f5dde7603c4cb2966ed342c17993d92e5906 Mon Sep 17 00:00:00 2001 From: Jiahao Huang Date: Wed, 26 Jun 2019 12:13:56 +0800 Subject: [PATCH] Revert "drainer: Log version info before other logs, fix #242 (#638)" (#645) 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)