Make logs less verbose (fixes #3627) (#4490)

This commit is contained in:
Nutomic 2024-03-01 17:32:13 +01:00 committed by GitHub
parent c895e57086
commit a7fa075e8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -209,11 +209,7 @@ cfg_if! {
impl fmt::Display for LemmyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}: ", &self.error_type)?;
// print anyhow including trace
// https://docs.rs/anyhow/latest/anyhow/struct.Error.html#display-representations
// this will print the anyhow trace (only if it exists)
// and if RUST_BACKTRACE=1, also a full backtrace
writeln!(f, "{:?}", self.inner)?;
writeln!(f, "{}", self.inner)?;
fmt::Display::fmt(&self.context, f)
}
}