Remove --verbose param

This commit is contained in:
Felix Ableitner 2022-10-28 15:50:33 +02:00
parent 418db7831f
commit 1d1823e27d
2 changed files with 7 additions and 7 deletions

View file

@ -4,13 +4,13 @@ extern crate derive_new;
use crate::crawl::{CrawlJob, CrawlParams, InstanceDetails}; use crate::crawl::{CrawlJob, CrawlParams, InstanceDetails};
use anyhow::Error; use anyhow::Error;
use futures::future::join_all; use futures::future::join_all;
use log::warn;
use once_cell::sync::Lazy; use once_cell::sync::Lazy;
use reqwest::{Client, ClientBuilder}; use reqwest::{Client, ClientBuilder};
use semver::Version; use semver::Version;
use std::collections::HashSet; use std::collections::HashSet;
use std::sync::Arc; use std::sync::Arc;
use std::time::Duration; use std::time::Duration;
use log::warn;
use tokio::sync::Mutex; use tokio::sync::Mutex;
pub mod crawl; pub mod crawl;
@ -47,7 +47,11 @@ pub async fn start_crawl(
.await .await
.into_iter() .into_iter()
.flatten() .flatten()
.inspect(|r| if let Err(e) = r { warn!("{}", e)}) .inspect(|r| {
if let Err(e) = r {
warn!("{}", e)
}
})
.filter_map(|r| r.ok()) .filter_map(|r| r.ok())
.collect(); .collect();

View file

@ -18,13 +18,9 @@ struct Parameters {
exclude_instances: Vec<String>, exclude_instances: Vec<String>,
#[structopt(short, long, default_value = "20")] #[structopt(short, long, default_value = "20")]
max_crawl_distance: i32, max_crawl_distance: i32,
/// Silence all output /// Silence all output
#[structopt(short, long)] #[structopt(short, long)]
quiet: bool, quiet: bool,
/// Verbose mode (-v, -vv, -vvv, etc)
#[structopt(short = "v", long = "verbose", parse(from_occurrences))]
verbose: usize,
} }
#[tokio::main] #[tokio::main]
@ -34,7 +30,7 @@ pub async fn main() -> Result<(), Error> {
stderrlog::new() stderrlog::new()
.module(module_path!()) .module(module_path!())
.quiet(params.quiet) .quiet(params.quiet)
.verbosity(params.verbose) .verbosity(1)
.init()?; .init()?;
eprintln!("Crawling..."); eprintln!("Crawling...");