Skip to content

Commit 726f34c

Browse files
bors[bot]dzvon
andauthored
Merge #10132
10132: docs(logging): use `tracing` for logging r=matklad a=dzvon Currently, we're using `tracing` for logging, but the doc is lagging, so update it. #9274 Co-authored-by: Dezhi Wu <[email protected]>
2 parents 796bfcc + b8ef2ac commit 726f34c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/dev/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer
4242
* [S-actionable](https://github.com/rust-analyzer/rust-analyzer/issues?q=is%3Aopen+is%3Aissue+label%3AS-actionable) and
4343
[S-unactionable](https://github.com/rust-analyzer/rust-analyzer/issues?q=is%3Aopen+is%3Aissue+label%3AS-unactionable)
4444
specify if there are concrete steps to resolve or advance an issue. Roughly, actionable issues need only work to be fixed,
45-
while unactionable ones are blocked either on user feedback (providing a reproducible example), or on larger architectural
45+
while unactionable ones are blocked either on user feedback (providing a reproducible example), or on larger architectural
4646
work or decisions. This classification is descriptive, not prescriptive, and might be wrong: Any unactionable issue might have a simple fix that we missed.
4747
Each triaged issue should have one of these labels.
4848
* [fun](https://github.com/rust-analyzer/rust-analyzer/issues?q=is%3Aopen+is%3Aissue+label%3Afun)
@@ -129,9 +129,10 @@ npm run lint
129129

130130
Logging is done by both rust-analyzer and VS Code, so it might be tricky to figure out where logs go.
131131

132-
Inside rust-analyzer, we use the standard `log` crate for logging, and `env_logger` for logging frontend.
132+
Inside rust-analyzer, we use the [`tracing`](https://docs.rs/tracing/) crate for logging,
133+
and [`tracing-subscriber`](https://docs.rs/tracing-subscriber) for logging frontend.
133134
By default, log goes to stderr, but the stderr itself is processed by VS Code.
134-
`--log-file <PATH>` CLI argument allows logging to file.
135+
`--log-file <PATH>` CLI argument allows logging to file.
135136
Setting the `RA_LOG_FILE=<PATH>` environment variable will also log to file, it will also override `--log-file`.
136137

137138
To see stderr in the running VS Code instance, go to the "Output" tab of the panel and select `rust-analyzer`.

0 commit comments

Comments
 (0)