From a6d45481849b3affb00da81358d53058daa6ecd6 Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Wed, 12 Feb 2020 16:57:44 +0800 Subject: [PATCH] Fix code bug: log to file only run background Signed-off-by: Jianhui Zhao --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index f2fdd1e..3ee1bc0 100644 --- a/main.go +++ b/main.go @@ -54,7 +54,7 @@ func init() { } out := consoleEx.ConsoleWriterEx{Out: colorable.NewColorableStdout()} - logger := zerolog.New(out).With().Caller().Timestamp().Logger().Hook(logFile) + logger := zerolog.New(out).With().Caller().Timestamp().Logger() if !terminal.IsTerminal(int(os.Stdout.Fd())) { logger = logger.Hook(logFile)