mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
add back code mistakenly removed in rebase
This commit is contained in:
parent
928246416a
commit
0d145d224f
1 changed files with 8 additions and 0 deletions
|
|
@ -26,6 +26,14 @@ const (
|
||||||
termCtxMaxPadding = 40
|
termCtxMaxPadding = 40
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// ResetGlobalState resets the fieldPadding, which is useful for producing
|
||||||
|
// predictable output.
|
||||||
|
func ResetGlobalState() {
|
||||||
|
fieldPaddingLock.Lock()
|
||||||
|
fieldPadding = make(map[string]int)
|
||||||
|
fieldPaddingLock.Unlock()
|
||||||
|
}
|
||||||
|
|
||||||
// fieldPadding is a global map with maximum field value lengths seen until now
|
// fieldPadding is a global map with maximum field value lengths seen until now
|
||||||
// to allow padding log contexts in a bit smarter way.
|
// to allow padding log contexts in a bit smarter way.
|
||||||
var fieldPadding = make(map[string]int)
|
var fieldPadding = make(map[string]int)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue