Zed: Issue with setting `logLevel`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 446
- Forks
- 32
- Avg merge
- 16h 48m
- Merged PRs (30d)
- 1
Description
If you set
"air": {
"initialization_options": {
"logLevel": "trace"
}
}
Then it correctly sets the log level to "trace" using the initialization option of air.logLevel, but if you change anything in the configuration after that then we try and re-pull the non-initialization version of air.logLevel (as we refresh everything) but this time around air.logLevel is None, so we end up reverting the log level back to "info", throwing out that initialization option of "trace".
This isn't a problem in VS Code because air.logLevel corresponds to both what we pull as the initialization option AND what we pull dynamically. In Zed I think they are separate, although I can't figure out how to set the non-initialization option of air.logLevel (it might not be possible).
We could say "if we pull air.logLevel=None and we have a previously set logLevel, then don't update the log level", but I worry about what that would mean for vs code, because in VS Code you may start with
"air.logLevel": "trace"
but then you may remove that line and expect it to go back to "info", but it won't if we do this. Although that may be a small price to pay for it to work mostly as expected elsewhere.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how Zed's initialization_options for air.logLevel are read and how configuration refreshes retrieve the non-initialization air.logLevel value. Compare that behavior with the VS Code setting described in the issue. Done means a Zed-configured trace level is not unexpectedly replaced by info during refresh, while the documented VS Code reset behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100