summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-05-10 16:20:30 +0200
committerMatthias Beyer <matthias.beyer@atos.net>2021-05-10 16:20:31 +0200
commit98d5898522da748d48ab97bb9d6893c05aaf7e5f (patch)
tree14ab2c2ac2a504aea6ee601cc17914e481598e86
parent1ebfa387fa5d47e3200b990f63f55bbe36adeff1 (diff)
Add human-panic setup
This patch adds a human-panic so that we get nice bug reports if an user experiences a crash of butido. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
-rw-r--r--Cargo.toml1
-rw-r--r--src/main.rs7
2 files changed, 8 insertions, 0 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 4eebeef..eb7b64a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -41,6 +41,7 @@ futures = "0.3"
getset = "0.1"
git2 = "0.13"
handlebars = { version = "3", features = ["no_logging"] }
+human-panic = "1"
humantime = "2.1"
indicatif = "0.15"
indoc = "1"
diff --git a/src/main.rs b/src/main.rs
index 45f587f..807032f 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -84,6 +84,13 @@ use crate::util::progress::ProgressBars;
#[tokio::main]
async fn main() -> Result<()> {
+ human_panic::setup_panic!(Metadata {
+ name: env!("CARGO_PKG_NAME").into(),
+ version: env!("CARGO_PKG_VERSION").into(),
+ authors: "Matthias Beyer <matthias.beyer@atos.net>".into(),
+ homepage: "atos.net/de/deutschland/sc".into(),
+ });
+
let _ = env_logger::try_init()?;
debug!("Debugging enabled");