/// Simple extension of Result<> to consume an error by logging it.
////// Often while running we want to just log the error near the top level and be
/// done with it, without terminating the program.
usestd::fmt::Display;useanyhow::Result;uselog::error;pubtraitLogError<E> {fnlog_error(&self);}impl<T, E>LogError<E>forResult<T, E>where
E: Display,
{fnlog_error(&self){matchself{Ok(_)=>{}Err(e)=>{error!("{}", e);}}}}