-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Hide beacon operation field in log if it's 0 #8330
Conversation
beacon-chain/blockchain/log_test.go
Outdated
}, | ||
{name: "has attestation", | ||
b: ðpb.BeaconBlock{Body: ðpb.BeaconBlockBody{Attestations: []*ethpb.Attestation{{}}}}, | ||
want: "attestations=1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only tests if the string contains attestations, maybe we should add an additional test to make sure the other ones are not there.
This breaks scripts that rely on the fields existing. I don't really like to have the same log message have different log structure. If it's just a cosmetic change for the way it's printed then I think this should be applied only when the logger is stdout. Notice that if you log to journald, you can request only nonzero fields to be printed |
Updating target to v1.2.0 |
Hey @terencechain whats the status on this PR? |
Ready. Let's target this for 1.3.0 |
What type of PR is this?
What does this PR do? Why is it needed?
Hide displaying rest of the beacon fields if the count is 0
Which issues(s) does this PR fix?
Fixes # N/A
Other notes for review
Tried run time and it seems fine. Although non-attestations weren't involved...