You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, only Debug is implemented on protocols::kad::src::query.rs::QueryId. It would be great to also add a Display implementation for logging purposes, for example.
Motivation
For logging purposes, we would like to get (using tracing) something like query_id=3 instead of what is currently done query_id=QueryId(3).
Indeed, since only Debug implemented, we currently have to do debug!(?query_id, "Got a query") which render query_id=QueryId(3).
We would like to be able to do debug!(%query_id, "Got a query") to get query_id=3 which would be shorter and cleaner.
Requirements
implement std::fmt::Display on protocols::kad::src::query.rs::QueryId: format!("{}", QueryId(3)) should return "3".
Open questions
No response
Are you planning to do it yourself in a pull request ?
Yes
The text was updated successfully, but these errors were encountered:
Description
Currently, only
Debug
is implemented onprotocols::kad::src::query.rs::QueryId
. It would be great to also add aDisplay
implementation for logging purposes, for example.Motivation
For logging purposes, we would like to get (using
tracing
) something likequery_id=3
instead of what is currently donequery_id=QueryId(3)
.Indeed, since only
Debug
implemented, we currently have to dodebug!(?query_id, "Got a query")
which renderquery_id=QueryId(3)
.We would like to be able to do
debug!(%query_id, "Got a query")
to getquery_id=3
which would be shorter and cleaner.Requirements
std::fmt::Display
onprotocols::kad::src::query.rs::QueryId
:format!("{}", QueryId(3))
should return"3"
.Open questions
No response
Are you planning to do it yourself in a pull request ?
Yes
The text was updated successfully, but these errors were encountered: