diff --git a/main.go b/main.go index 238bca1..a80bc9d 100644 --- a/main.go +++ b/main.go @@ -67,8 +67,6 @@ func setupLogging(log LogConfig) { level = logging.INFO } - logging.SetLevel(level, "") - // if log tag has file path, then it open file in append mode, // otherwise it will use default stdout logger if log.LogPath != "" { @@ -80,6 +78,8 @@ func setupLogging(log LogConfig) { logging.SetBackend(logging.NewLogBackend(logFile, "", 0)) } + + logging.SetLevel(level, "") } func bootstrapNode() {