use log::LevelFilter; use crate::cli::CliArgs; pub fn init(cliargs: &CliArgs) { let level = if cliargs.debug { LevelFilter::Debug } else { LevelFilter::Info }; env_logger::builder() .format_timestamp(None) .filter(Some("xmpd"), level) .filter(Some("xmpd_cli"), level) .filter(Some("xmpd_gui"), level) .filter(Some("xmpd_manifest"), level) .filter(Some("xmpd_config"), level) .filter(Some("xmpd_dl"), level) .init(); }