diff --git a/cmd/tendermint/commands/root.go b/cmd/tendermint/commands/root.go index e6a175665..f229a7889 100644 --- a/cmd/tendermint/commands/root.go +++ b/cmd/tendermint/commands/root.go @@ -14,7 +14,7 @@ import ( var ( config = cfg.DefaultConfig() - logger = log.NewTMLogger(log.NewSyncWriter(os.Stdout)).With("module", "main") + logger = log.NewTMLogger(log.NewSyncWriter(os.Stdout)) ) func init() { @@ -57,6 +57,7 @@ var RootCmd = &cobra.Command{ if viper.GetBool(cli.TraceFlag) { logger = log.NewTracingLogger(logger) } + logger = logger.With("module", "main") return nil }, } diff --git a/config/config.go b/config/config.go index 6395c60fd..5a15cff47 100644 --- a/config/config.go +++ b/config/config.go @@ -189,9 +189,10 @@ func DefaultLogLevel() string { return "error" } -// DefaultPackageLogLevels returns a default log level setting so all packages log at "error", while the `state` package logs at "info" +// DefaultPackageLogLevels returns a default log level setting so all packages +// log at "error", while the `state` and `main` packages log at "info" func DefaultPackageLogLevels() string { - return fmt.Sprintf("state:info,*:%s", DefaultLogLevel()) + return fmt.Sprintf("main:info,state:info,*:%s", DefaultLogLevel()) } //-----------------------------------------------------------------------------