Commit Diff


commit - a60f9bd921b2b6be0b45d81d723c112aea5d90ca
commit + c25307ceb4d73b46b6649327675385d6301cd8fd
blob - a70fa5913c25dc3a66bded36ec4511ba2f890e0c
blob + 5ff762738d4a6ceacce92e80ba68355c6dce5e97
--- src/cli.rs
+++ src/cli.rs
@@ -68,13 +68,21 @@ impl Cli {
 
         // setup logging as soon as possible
         let verbosity = match args.verbose {
-            0 => log::Level::Warn,
-            1 => log::Level::Info,
-            2 => log::Level::Debug,
-            _ => log::Level::Trace,
+            0 => log::LevelFilter::Warn,
+            1 => log::LevelFilter::Info,
+            2 => log::LevelFilter::Debug,
+            _ => log::LevelFilter::Trace,
         };
-        simple_logger::init_with_level(verbosity).context(LoggerSnafu)?;
 
+        // rustls is way too chatty and the messages don't serve a purpose for this program. Hard
+        // code its logging level to "Warn" so the debug logs of rss-email are actually readable
+        // and useful.
+        simple_logger::SimpleLogger::new()
+            .with_module_level("rustls", log::LevelFilter::Warn)
+            .with_level(verbosity)
+            .init()
+            .context(LoggerSnafu)?;
+
         let data_dir = data_dir();
         if !PathBuf::from(&data_dir).exists() {
             debug!(