pub fn log_error(e: &impl Debug) -> String
Format an error into a nice way to show it in a log message. e.g.
trace!("Action failed.{}", log_error(&e));