config store & event loop with reconn

This commit is contained in:
2021-08-21 22:35:01 +02:00
parent 1ea3aa7cb0
commit 5a631f785e
8 changed files with 1249 additions and 87 deletions
+16
View File
@@ -0,0 +1,16 @@
use std::error::Error;
pub trait LogError {
fn log_error<S : AsRef<str>>(self, msg: S);
}
impl<V, E : Error> LogError for Result<V, E> {
fn log_error<S : AsRef<str>>(self, msg: S) {
match self {
Ok(_) => {}
Err(e) => {
error!("{}: {}", msg.as_ref(), e);
}
}
}
}