Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpc: fix time key collision for logger with json output #24112

Merged
merged 2 commits into from Dec 15, 2021

Conversation

bobakxd
Copy link
Contributor

@bobakxd bobakxd commented Dec 15, 2021

There's t parameter overwriting for messages in rpc package when Geth node uses --log.json flag. Here's an example of such overwriting:

{"err":"sealing paused while waiting for transactions","lvl":"warn","msg":"Block sealing failed","t":"2021-12-15T14:16:48.131233613+03:00"}
{"lvl":"dbug","msg":"Served rpc_modules","reqid":"1","t":"33.633µs"}
{"lvl":"trce","msg":"Handled RPC response","reqid":"1","t":"334ns"}
{"lvl":"dbug","msg":"Served web3_clientVersion","reqid":"2","t":"27.963µs"}

In this PR I've tried to fix this by renaming t parameter.

Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@fjl fjl merged commit 0ba0b81 into ethereum:master Dec 15, 2021
@fjl fjl added this to the 1.10.14 milestone Dec 15, 2021
JacekGlen pushed a commit to JacekGlen/go-ethereum that referenced this pull request May 26, 2022
The "t" key overrides the log message time in JSON output.

Co-authored-by: Felix Lange <fjl@twurst.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants