|
|
@ -26,7 +26,7 @@ pub trait AppConfig: Sized + Serialize + DeserializeOwned + Debug + Default { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// Get log module levels to use (take priority over the main log level)
|
|
|
|
/// Get log module levels to use (take priority over the main log level)
|
|
|
|
fn logging_mod_levels(&self) -> Option<HashMap<String, String>> { |
|
|
|
fn logging_mod_levels(&self) -> Option<&HashMap<String, String>> { |
|
|
|
None |
|
|
|
None |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -180,8 +180,8 @@ pub trait AppConfig: Sized + Serialize + DeserializeOwned + Debug + Default { |
|
|
|
|
|
|
|
|
|
|
|
if let Some(mod_levels) = config.logging_mod_levels() { |
|
|
|
if let Some(mod_levels) = config.logging_mod_levels() { |
|
|
|
for (module, lvl) in mod_levels { |
|
|
|
for (module, lvl) in mod_levels { |
|
|
|
let lvl = log::LevelFilter::from_str(lvl.as_ref())?; |
|
|
|
let lvl = log::LevelFilter::from_str(lvl)?; |
|
|
|
builder.filter_module(module.as_ref(), lvl); |
|
|
|
builder.filter_module(module, lvl); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|