mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
core: fix log format
This commit is contained in:
parent
edd380a1d1
commit
42b5737bac
1 changed files with 8 additions and 2 deletions
|
|
@ -18,6 +18,7 @@ package core
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
|
|
@ -118,7 +119,7 @@ DB commit: %v
|
|||
Block write: %v
|
||||
Total: %v
|
||||
|
||||
State read cache: %s
|
||||
%s
|
||||
##############################
|
||||
`, block.Number(), block.Hash(), len(block.Transactions()), s.MgasPerSecond,
|
||||
common.PrettyDuration(s.Execution), common.PrettyDuration(s.Validation+s.CrossValidation),
|
||||
|
|
@ -127,5 +128,10 @@ State read cache: %s
|
|||
common.PrettyDuration(s.AccountHashes+s.AccountCommits+s.AccountUpdates+s.StorageCommits+s.StorageUpdates),
|
||||
common.PrettyDuration(s.TrieDBCommit+s.SnapshotCommit), common.PrettyDuration(s.BlockWrite),
|
||||
common.PrettyDuration(s.TotalTime), s.StateReadCacheStats)
|
||||
log.Info(msg)
|
||||
|
||||
log.Info("")
|
||||
for _, line := range strings.Split(msg, "\n") {
|
||||
log.Info(line)
|
||||
}
|
||||
log.Info("")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue