Add tracing support to mdtest (#14935)

## Summary

This PR extends the mdtest configuration with a `log` setting that can
be any of:

* `true`: Enables tracing
* `false`: Disables tracing (default)
* String: An ENV_FILTER similar to `RED_KNOT_LOG`

```toml
log = true
```

Closes https://github.com/astral-sh/ruff/issues/13865

## Test Plan

I changed a test and tried `log=true`, `log=false`, and `log=INFO`
This commit is contained in:
Micha Reiser 2024-12-13 10:10:01 +01:00 committed by GitHub
parent 1c8f356e07
commit f52b1f4a4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 94 additions and 60 deletions

View file

@ -158,7 +158,7 @@ impl LoggingBuilder {
.parse()
.expect("Hardcoded directive to be valid"),
),
hierarchical: true,
hierarchical: false,
}
}
@ -167,7 +167,7 @@ impl LoggingBuilder {
Some(Self {
filter,
hierarchical: true,
hierarchical: false,
})
}