Set default log level and initialize logger before load config

This commit is contained in:
Adrian Woźniak 2021-08-04 16:00:28 +02:00
parent bc2a9fe87d
commit c110d98959
No known key found for this signature in database
GPG Key ID: 0012845A89C7352B

View File

@ -218,8 +218,7 @@ fn main() -> std::io::Result<()> {
} }
let config = load_config()?; let config = load_config()?;
log::set_max_level(config.log_level().to_str().parse().unwrap());
std::env::set_var("RUST_LOG", config.log_level().to_str());
let opts: Opts = Opts::parse_args_default_or_exit(); let opts: Opts = Opts::parse_args_default_or_exit();