Skip to content

Shorten alloy types display output #6080

Closed
@emhane

Description

@emhane

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 simply trace!(peer_id=#peer_id). for now we need to allocate a string for this like trace!(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 lists
tracing!(hashes=format!("[{}]", hashes.iter().fold(String::new(), |acc, &hash| acc + &format!("{hash:#},"))))

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-networkingRelated to networking in generalA-observabilityRelated to tracing, metrics, logs and other observability toolsD-good-first-issueNice and easy! A great choice to get startedM-prevent-stalePrevents old inactive issues/PRs from being closed due to inactivity

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions