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 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();

View file

@ -18,13 +18,9 @@ struct Parameters {
exclude_instances: Vec<String>,
#[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...");