~witcher/rss-email

c25307ceb4d73b46b6649327675385d6301cd8fd — Thomas Böhler 6 months ago a60f9bd
fix: Set rustls log level to "Warn"

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.

Signed-off-by: Thomas Böhler <witcher@wiredspace.de>
1 files changed, 13 insertions(+), 5 deletions(-)

M src/cli.rs
M src/cli.rs => src/cli.rs +13 -5
@@ 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() {