feat: allow setting misc.log_filters in config.toml (#552)

Allow setting `log_filters` in `config.toml`

This allows setting a list of `log_filters` in the `[misc]` section in
the `config.toml`. These filters are prepended to any filters listed
with `--log-filters`. Finally, `--verbose` can now be used with
`--log-filters`, and it will append `debug` to the list of filters
rather than replacing it entirely.
This commit is contained in:
Rebecca Turner
2023-09-17 03:04:46 -04:00
committed by GitHub
parent 06a6b7a2eb
commit c1c9fe22df
3 changed files with 21 additions and 10 deletions

View File

@@ -64,8 +64,6 @@ fn run() -> Result<()> {
return Ok(());
}
install_tracing(&opt.tracing_filter_directives())?;
for env in opt.env_variables() {
let mut splitted = env.split('=');
let var = splitted.next().unwrap();
@@ -84,6 +82,7 @@ fn run() -> Result<()> {
}
let config = Config::load(opt)?;
install_tracing(&config.tracing_filter_directives())?;
set_title(config.set_title());
display_time(config.display_time());
set_desktop_notifications(config.notify_each_step());