Add panic logging

This commit is contained in:
Caelan Sayler
2024-12-01 21:23:37 +00:00
parent 7809223872
commit c03a960a25
4 changed files with 13 additions and 0 deletions

10
Cargo.lock generated
View File

@@ -1236,6 +1236,15 @@ dependencies = [
"value-bag",
]
[[package]]
name = "log-panics"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68f9dd8546191c1850ecf67d22f5ff00a935b890d0e84713159a55495cc2ac5f"
dependencies = [
"log",
]
[[package]]
name = "malloc_buf"
version = "0.0.6"
@@ -2305,6 +2314,7 @@ dependencies = [
"libc",
"libloading",
"log",
"log-panics",
"memmap2",
"native-dialog",
"normpath",

View File

@@ -78,6 +78,7 @@ memmap2 = "0.9"
webview2-com = "0.33"
windows = "0.58"
cbindgen = "0.27"
log-panics = "2.1.0"
# default to small, optimized workspace release binaries
[profile.release]

View File

@@ -62,6 +62,7 @@ file-rotate.workspace = true
wait-timeout.workspace = true
pretty-bytes-rust.workspace = true
enum-flags.workspace = true
log-panics.workspace = true
[target.'cfg(unix)'.dependencies]
native-dialog.workspace = true

View File

@@ -29,6 +29,7 @@ pub fn setup_logging(process_name: &str, file: Option<&PathBuf>, console: bool,
}
CombinedLogger::init(loggers)?;
log_panics::init();
Ok(())
}