Fix logging initialization
This commit is contained in:
parent
5d64a8ed1f
commit
70505f2078
1 changed files with 7 additions and 11 deletions
|
@ -7,17 +7,13 @@ use std::{process::Command, path::PathBuf};
|
||||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
let args = CliArgs::parse();
|
let args = CliArgs::parse();
|
||||||
|
|
||||||
if args.debug {
|
simplelog::SimpleLogger::init(
|
||||||
let _ = simplelog::SimpleLogger::init(
|
match args.debug {
|
||||||
simplelog::LevelFilter::Debug,
|
true => simplelog::LevelFilter::Debug,
|
||||||
|
false => simplelog::LevelFilter::Info,
|
||||||
|
},
|
||||||
simplelog::Config::default(),
|
simplelog::Config::default(),
|
||||||
);
|
)?;
|
||||||
} else {
|
|
||||||
let _ = simplelog::SimpleLogger::init(
|
|
||||||
simplelog::LevelFilter::Info,
|
|
||||||
simplelog::Config::default(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
debug!("Opening Config file: {}", args.config_file.display());
|
debug!("Opening Config file: {}", args.config_file.display());
|
||||||
debug!(
|
debug!(
|
||||||
|
|
Loading…
Reference in a new issue