-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Shorten alloy types display output #6080
Comments
Lists can be formatted more easily with format!("[{:#}]", list.iter().format(", ")) |
peer id is probably ok to shorten for all cases, but not tx hash. since block explorers require the whole hash in a search query, it's good to keep the whole hash even if the list is long. |
This issue is stale because it has been open for 21 days with no activity. |
closing because unclear what the todos here are if there's anything actionable here, please open a new good first issue for this |
Describe the feature
make logs more friendly to read for the human eye.
it would be best to output the alternate display form of the alloy
FixedBytes
types. rn, tracing crate doesn't support this tokio-rs/tracing#1311, so we can't get away with simplytrace!(peer_id=#peer_id)
. for now we need to allocate a string for this liketrace!(peer_id=format!("{peer_id:#}")
.to take into consideration here, is if any interop tests are using the current log output format, and if this then is a breaking change. (update: this is verified, it won't be a breaking change, no interop tests use hard coded log output as checkpoints)
here is how I have been setting alternate display flag in
tracing
for liststracing!(hashes=format!("[{}]", hashes.iter().fold(String::new(), |acc, &hash| acc + &format!("{hash:#},"))))
Additional context
No response
The text was updated successfully, but these errors were encountered: