Fix logging initialization

main
Elnu 1 year ago
parent 5d64a8ed1f
commit 70505f2078

@ -7,17 +7,13 @@ use std::{process::Command, path::PathBuf};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let args = CliArgs::parse();
if args.debug {
let _ = simplelog::SimpleLogger::init(
simplelog::LevelFilter::Debug,
simplelog::SimpleLogger::init(
match args.debug {
true => simplelog::LevelFilter::Debug,
false => simplelog::LevelFilter::Info,
},
simplelog::Config::default(),
);
} else {
let _ = simplelog::SimpleLogger::init(
simplelog::LevelFilter::Info,
simplelog::Config::default(),
);
}
)?;
debug!("Opening Config file: {}", args.config_file.display());
debug!(

Loading…
Cancel
Save