Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why this should be merged
With the geth v1.13.2 stack loops are only available with location enabled flag is true, which changes the log format. This PR fixes it.
Before this PR logs were like:
INFO [03-29|10:05:40.152] <2ebCneCbwthjQ1rYT41nhd7M76Hc6YmosMAQrTFhBq8qeqh6tt Chain> %!v(NOFUNC): Loaded most recent local header number=826,885 hash=4cc72d..88f75e age=12h29m53s
after this PR:
[03-29|14:26:57.788] INFO <27BFHWcKjzJZstyMpN73P2GZUsVryjQcUFtd8HRQWzGvLZmxoh Chain> subnet-evm/core/blockchain.go:774 Loaded most recent local header number=0 hash=9dc18d..ef26f7 age=55y1w4d
which is more aligned with avalanchego logger i.e:
[03-29|14:26:52.021] INFO <P Chain> validators/logger.go:50 node added to validator set {"subnetID": "29uVeLPJB1eQJkzRemU8g8wZDw5uJRqpab5U2mX9euieVwiEbL", "nodeID": "NodeID-MFrZFVCXPv5iCn6M9K6XduxGTYp891xXZ", "publicKey": "0x", "txID": "vR2sz79HGcppYFoJpNsuSJ5WYVFK7usuzg3T2FxC7vEnB3z6k", "weight": 50}
How this works
There are too many unexported functions in geth's log package and if we maintain our own format we need them. This PR fetches the log/format.go from upstream and adds extra formats in format_extra.go.
How this was tested
Locally tested
How is this documented
No need