This repository was archived by the owner on Sep 12, 2024. It is now read-only.
This repository was archived by the owner on Sep 12, 2024. It is now read-only.
When should Display
of Error
also print the cause? #23
Open
Description
anyhow prints the cause chain only with {:#}
but tokio-postgres always prints the cause. This causes rust-postgres errors wrapped in anyhow errors to be printed twice if at all.
log::error!("postgres connection failed: {:#}", e);
postgres connection failed: db error: FATAL: terminating connection due to administrator command: FATAL: terminating connection due to administrator command
https://github.com/dtolnay/anyhow/blob/5e4177fc4c9e211feb90f1d81ea0ef183f171fa7/src/fmt.rs#L9-L13
Metadata
Metadata
Assignees
Labels
No labels