consensus: Groom Logs (#5917)

Executed a local network using simapp and looked for logs that seemed superfluous. This isn't by any means an exhaustive grooming, but should drastically help legibility of logs.

ref: #5912
This commit is contained in:
Aleksandr Bezobchuk
2021-02-17 10:05:13 +00:00
committed by Marko
parent 1030072dd0
commit bedb00d252
7 changed files with 124 additions and 109 deletions
+4 -12
View File
@@ -20,6 +20,9 @@ const (
LogFormatPlain = "plain"
// LogFormatJSON is a format for json output
LogFormatJSON = "json"
// DefaultLogLevel defines a default log level as INFO.
DefaultLogLevel = "info"
)
// NOTE: Most of the structs & relevant comments + the
@@ -225,7 +228,7 @@ func DefaultBaseConfig() BaseConfig {
Moniker: defaultMoniker,
ProxyApp: "tcp://127.0.0.1:26658",
ABCI: "socket",
LogLevel: DefaultPackageLogLevels(),
LogLevel: DefaultLogLevel,
LogFormat: LogFormatPlain,
FastSyncMode: true,
FilterPeers: false,
@@ -284,17 +287,6 @@ func (cfg BaseConfig) ValidateBasic() error {
return nil
}
// DefaultLogLevel returns a default log level of "error"
func DefaultLogLevel() string {
return "error"
}
// 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("main:info,state:info,statesync:info,*:%s", DefaultLogLevel())
}
//-----------------------------------------------------------------------------
// RPCConfig