feat(core): add logging for panics
This commit is contained in:
parent
8b73a41439
commit
e08bf2f69a
10
Cargo.lock
generated
10
Cargo.lock
generated
|
@ -314,6 +314,7 @@ dependencies = [
|
||||||
"html2text",
|
"html2text",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"log",
|
"log",
|
||||||
|
"log-panics",
|
||||||
"maplit",
|
"maplit",
|
||||||
"markdown",
|
"markdown",
|
||||||
"serde",
|
"serde",
|
||||||
|
@ -627,6 +628,15 @@ dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "log-panics"
|
||||||
|
version = "2.0.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "ae0136257df209261daa18d6c16394757c63e032e27aafd8b07788b051082bef"
|
||||||
|
dependencies = [
|
||||||
|
"log",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mac"
|
name = "mac"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
|
|
|
@ -37,3 +37,4 @@ serde = { version = "1.0.123", features = ["derive"] }
|
||||||
serde_json = "1.0.62"
|
serde_json = "1.0.62"
|
||||||
markdown = "0.3.0"
|
markdown = "0.3.0"
|
||||||
html2text = "0.2.1"
|
html2text = "0.2.1"
|
||||||
|
log-panics = "2.0.0"
|
|
@ -263,6 +263,9 @@ fn main() {
|
||||||
WriteLogger::new(LevelFilter::Info, config, log_proxy.clone()),
|
WriteLogger::new(LevelFilter::Info, config, log_proxy.clone()),
|
||||||
])
|
])
|
||||||
.expect("unable to initialize logs");
|
.expect("unable to initialize logs");
|
||||||
|
|
||||||
|
// Activate logging for panics
|
||||||
|
log_panics::init();
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut cli_args: CliModuleArgs = CliModuleArgs::default();
|
let mut cli_args: CliModuleArgs = CliModuleArgs::default();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user