diff --git a/src/config.rs b/src/config.rs index 1a48d44..f0afd87 100644 --- a/src/config.rs +++ b/src/config.rs @@ -37,7 +37,7 @@ pub struct ConfigMetadata { #[derive(Deserialize)] pub struct Settings { - pub log_level: i64, + pub log_level: usize, pub log_file: String, pub crash_report: bool, pub crash_report_dir: String, diff --git a/src/lib.rs b/src/lib.rs index d243054..e80d5b9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -25,7 +25,9 @@ extern "C" fn attach() { // unsafe { // crash::install(); // } - watchdog::install(); + if CONFIG.settings.watchdog { + watchdog::install(); + } simple_logging::log_to_file(&CONFIG.settings.log_file, LevelFilter::Trace).unwrap(); if CONFIG.metadata.name != "dfint localization hook" { error!("unable to find config file");