From 9a5d61313b780bdc176866f17f71276d79815a32 Mon Sep 17 00:00:00 2001 From: mrl5 <31549762+mrl5@users.noreply.github.com> Date: Mon, 14 Mar 2022 22:56:26 +0100 Subject: [PATCH] feat(cli): info as default log level --- crates/cli/src/main.rs | 4 +++- docs/COOKBOOK.md | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index 566a8cb..16f8c4a 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -27,7 +27,9 @@ struct CliOptions { #[tokio::main] async fn main() { - env_logger::init(); + env_logger::init_from_env( + env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "info"), + ); log::debug!("initialized logger"); let opts = CliOptions::from_args(); diff --git a/docs/COOKBOOK.md b/docs/COOKBOOK.md index 3372458..718421a 100644 --- a/docs/COOKBOOK.md +++ b/docs/COOKBOOK.md @@ -17,7 +17,7 @@ vulner --help export VULNER_FEED_DIR=$HOME/vulner/feeds/json export VULNER_OUT_DIR=$HOME/vulner/scan-results -RUST_LOG=info vulner sync +vulner sync RUST_LOG=warn vulner scan ``` Results in: @@ -65,7 +65,6 @@ kit="gnome-kit" export VULNER_FEED_DIR=$HOME/vulner/feeds/json export VULNER_OUT_DIR=$HOME/vulner/${kit}-scan-results -export RUST_LOG=info vulner sync vulner scan --pkg-dir /var/git/meta-repo/kits/${kit}/ @@ -76,7 +75,6 @@ vulner scan --pkg-dir /var/git/meta-repo/kits/${kit}/ ```bash export VULNER_FEED_DIR=$HOME/vulner/feeds/json export VULNER_OUT_DIR=$HOME/vulner/${kit}-scan-results -export RUST_LOG=info vulner sync vulner scan --pkg-dir /var/git/meta-repo/ --recursive