rbatis/fast_log

ModuleFilter usage

jb-alvarado opened this issue · 1 comments

Hello,
in the older version from fast_log I used:

let mut mail_config = Config::new()
    .chan_len(Some(100000))
    .level(level)
    .filter(ModuleFilter::new_exclude(vec![
        "rustls".to_string(),
        "hyper".to_string(),
        "mio".to_string(),
    ]))
    .format(LogFormat::new().set_display_line_level(CONFIG.log_level));

But this function is changed. So I try something like:

let filter = ModuleFilter::new();
filter.modules.pushes(vec![
    "rustls".to_string(),
    "hyper".to_string(),
    "mio".to_string(),
]);

let mut mail_config = Config::new()
    .chan_len(Some(100000))
    .level(level)
    .add_filter(filter)
    .format(LogFormat::new().set_display_line_level(CONFIG.log_level));

But this didn't work. Can you explain, how to solve this?

how to solve this? I have the same problem