Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: format tcp connection error using
Display
(#10286)
Reported by @wacban. Debug printing results in multiline strings, which are hard to interpret. It also breaks tooling one might want to use to analyze logs. Example: ``` 2023-12-01T10:22:08.186809Z INFO network: failed to connect to ed25519:[email protected]:54063 result=Err(tcp::Stream::connect() Caused by: deadline has elapsed) ``` I believe this is coming from the default `Debug` impl for `anyhow::Error`. Using `Display` impl should fix it as it concatenates the context via `:` instead. --------- Co-authored-by: nikurt <[email protected]>
- Loading branch information