Skip to content

Commit 42b5737

Browse files
committed
core: fix log format
1 parent edd380a commit 42b5737

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

core/blockchain_stats.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package core
1818

1919
import (
2020
"fmt"
21+
"strings"
2122
"time"
2223

2324
"github.com/ethereum/go-ethereum/common"
@@ -118,7 +119,7 @@ DB commit: %v
118119
Block write: %v
119120
Total: %v
120121
121-
State read cache: %s
122+
%s
122123
##############################
123124
`, block.Number(), block.Hash(), len(block.Transactions()), s.MgasPerSecond,
124125
common.PrettyDuration(s.Execution), common.PrettyDuration(s.Validation+s.CrossValidation),
@@ -127,5 +128,10 @@ State read cache: %s
127128
common.PrettyDuration(s.AccountHashes+s.AccountCommits+s.AccountUpdates+s.StorageCommits+s.StorageUpdates),
128129
common.PrettyDuration(s.TrieDBCommit+s.SnapshotCommit), common.PrettyDuration(s.BlockWrite),
129130
common.PrettyDuration(s.TotalTime), s.StateReadCacheStats)
130-
log.Info(msg)
131+
132+
log.Info("")
133+
for _, line := range strings.Split(msg, "\n") {
134+
log.Info(line)
135+
}
136+
log.Info("")
131137
}

0 commit comments

Comments
 (0)