Skip to content

Commit

Permalink
Fix code bug: log to file only run background
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
  • Loading branch information
zhaojh329 committed Feb 12, 2020
1 parent 2f83c70 commit a6d4548
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a6d4548

Please sign in to comment.