diff --git a/cli/config/config.go b/cli/config/config.go index 1583b48983..ea41b72a93 100644 --- a/cli/config/config.go +++ b/cli/config/config.go @@ -19,7 +19,7 @@ type Args struct { // Global expose available global config for cli command type Global struct { LogLevel string `yaml:"LogLevel" env:"LOG_LEVEL" env-default:"info" env-description:"Defines logger's log level"` - LogFormat string `yaml:"LogFormat" env:"LOG_FORMAT" env-default:"console" env-description:"Defines logger's encoding, valid values are 'json' and 'console'(default)"` + LogFormat string `yaml:"LogFormat" env:"LOG_FORMAT" env-default:"console" env-description:"Defines logger's encoding, valid values are 'json' and 'console' (default)"` LogLevelFormat string `yaml:"LogLevelFormat" env:"LOG_LEVEL_FORMAT" env-default:"capitalColor" env-description:"Defines logger's level format, valid values are 'capitalColor' (default), 'capital' or 'lowercase'"` LogFilePath string `yaml:"LogFilePath" env:"LOG_FILE_PATH" env-default:"./data/debug.log" env-description:"Defines a file path to write logs into"` LogFileSize int `yaml:"LogFileSize" env:"LOG_FILE_SIZE" env-default:"500" env-description:"Defines a file size in megabytes to rotate logs"` diff --git a/cli/operator/node.go b/cli/operator/node.go index 1ab7caa893..72c72e5d85 100644 --- a/cli/operator/node.go +++ b/cli/operator/node.go @@ -384,7 +384,7 @@ var StartNodeCmd = &cobra.Command{ operatorPrivKey, keyManager, ) - nodeProber.AddNode(nodeprobe.EvenSyncerNode, eventSyncer) + nodeProber.AddNode(nodeprobe.EventSyncerNode, eventSyncer) } nodeProber.Start(cmd.Context()) diff --git a/nodeprobe/nodeprobe.go b/nodeprobe/nodeprobe.go index 230d2af70f..2f59467545 100644 --- a/nodeprobe/nodeprobe.go +++ b/nodeprobe/nodeprobe.go @@ -11,7 +11,7 @@ import ( ) const ( - EvenSyncerNode = "Ethereum event syncer" + EventSyncerNode = "Ethereum event syncer" ConsensusClientNode = "Ethereum consensus client" ExecutionClientNode = "Ethereum execution client" @@ -110,7 +110,12 @@ func (p *Prober) probe(ctx context.Context) { p.healthy.Store(healthy.Load()) if !p.healthy.Load() { - p.logger.Error("not all Ethereum nodes are healthy") + p.logger.Error(fmt.Sprintf( + "not all nodes (%s, %s, %s), are healthy", + EventSyncerNode, + ConsensusClientNode, + ExecutionClientNode, + )) if h := p.unhealthyHandler; h != nil { h() } @@ -159,9 +164,9 @@ func (p *Prober) CheckEventSyncerHealth(ctx context.Context) error { defer p.nodesMu.Unlock() ctx, cancel := context.WithTimeout(ctx, p.interval) defer cancel() - es, ok := p.nodes[EvenSyncerNode] + es, ok := p.nodes[EventSyncerNode] if !ok { - return fmt.Errorf("%s not found", EvenSyncerNode) + return fmt.Errorf("%s not found", EventSyncerNode) } return es.Healthy(ctx) } diff --git a/storage/kv/badger.go b/storage/kv/badger.go index 71529a89e1..e3e12d718b 100644 --- a/storage/kv/badger.go +++ b/storage/kv/badger.go @@ -3,18 +3,16 @@ package kv import ( "bytes" "context" - "github.com/dgraph-io/ristretto/z" "sync" "time" - "github.com/ssvlabs/ssv/logging/fields" - "github.com/dgraph-io/badger/v4" + "github.com/dgraph-io/ristretto/z" "github.com/pkg/errors" - "go.uber.org/zap" - "github.com/ssvlabs/ssv/logging" + "github.com/ssvlabs/ssv/logging/fields" "github.com/ssvlabs/ssv/storage/basedb" + "go.uber.org/zap" ) // BadgerDB struct @@ -95,7 +93,7 @@ func createDB(logger *zap.Logger, options basedb.Options, inMemory bool) (*Badge out := z.CallocNoRef(1, "jemalloc check") defer z.Free(out) jemallocEnabled := len(out) > 0 - logger.Debug("jemalloc allocator will be used", zap.Bool("jemalloc_enabled", jemallocEnabled)) + logger.Debug("checking if jemalloc allocator will be used", zap.Bool("jemalloc_enabled", jemallocEnabled)) return &badgerDB, nil }