rust-lang / rust-lang/rust-analyzer
Assits: enable log statement
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
I use printf debugging a lot, and the problem with printfs is that you have to recompile the code, which is slow.
An alternative is to use loging, which can be configured at run time and does not need recompiling.
However, I find logs not very useful for debugging, as enabling logging is cumbersome, and you usually get way to much output.
Ideally, I'd love to be able to enable not only the whole log level, but specific log statements. I believe an IDE should help here:
- for each log statement, there's an assist "enable log statement"
- IDE maintains a persitent list of enabled log statemtnts
- when running tasks, IDE set's
RUST_LOGenv variable to only hit the specified statements.
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 clarifying how IDE assists, persistent enabled log statements, and task environment configuration are represented. Check how running tasks currently handles the RUST_LOG environment variable; done should include an assist that selects individual log statements and applies those selections when tasks run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100