Skip to content

Commit

Permalink
Log genesis configuration on debug level
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Ethernal committed Apr 16, 2024
1 parent 304b7dd commit 4f716de
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,22 @@ func NewServer(config *Config) (*Server, error) {
restoreProgression: progress.NewProgressionWrapper(progress.ChainSyncRestore),
}

m.logger.Info("Data dir", "path", config.DataDir)
m.logger.Info("Version metadata",
m.logger.Info("data dir", "path", config.DataDir)
m.logger.Info("version metadata",
"version", versioning.Version,
"commit", versioning.Commit,
"branch", versioning.Branch,
"build time", versioning.BuildTime)

if m.logger.IsDebug() {
chainConfigJSON, err := json.MarshalIndent(config.Chain, "", "\t")
if err != nil {
return nil, fmt.Errorf("failed to marshal chain config to JSON: %w", err)
}

m.logger.Debug(fmt.Sprintf("chain configuration %s", string(chainConfigJSON)))
}

var dirPaths = []string{
"blockchain",
"trie",
Expand Down

0 comments on commit 4f716de

Please sign in to comment.