Skip to content

Commit

Permalink
use config for watchdog to start or not
Browse files Browse the repository at this point in the history
  • Loading branch information
shevernitskiy committed Oct 1, 2023
1 parent 3e97795 commit 734eaf6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 734eaf6

Please sign in to comment.