diff --git a/src/lib.rs b/src/lib.rs index eaaae07..245a8b3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,13 +4,13 @@ extern crate derive_new; use crate::crawl::{CrawlJob, CrawlParams, InstanceDetails}; use anyhow::Error; use futures::future::join_all; +use log::warn; use once_cell::sync::Lazy; use reqwest::{Client, ClientBuilder}; use semver::Version; use std::collections::HashSet; use std::sync::Arc; use std::time::Duration; -use log::warn; use tokio::sync::Mutex; pub mod crawl; @@ -47,7 +47,11 @@ pub async fn start_crawl( .await .into_iter() .flatten() - .inspect(|r| if let Err(e) = r { warn!("{}", e)}) + .inspect(|r| { + if let Err(e) = r { + warn!("{}", e) + } + }) .filter_map(|r| r.ok()) .collect(); diff --git a/src/main.rs b/src/main.rs index 7ca7124..a8447c8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -18,13 +18,9 @@ struct Parameters { exclude_instances: Vec, #[structopt(short, long, default_value = "20")] max_crawl_distance: i32, - /// Silence all output #[structopt(short, long)] quiet: bool, - /// Verbose mode (-v, -vv, -vvv, etc) - #[structopt(short = "v", long = "verbose", parse(from_occurrences))] - verbose: usize, } #[tokio::main] @@ -34,7 +30,7 @@ pub async fn main() -> Result<(), Error> { stderrlog::new() .module(module_path!()) .quiet(params.quiet) - .verbosity(params.verbose) + .verbosity(1) .init()?; eprintln!("Crawling...");