@@ 68,12 68,20 @@ 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() {