pub fn log_error<E: Display>(context: &str, err: E) -> E
Log an error with context and return the error.
This is useful for logging errors in a chain of Results.