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 <wu543065657@163.com>
This commit is contained in:
bors[bot] 2021-09-03 09:25:29 +00:00 committed by GitHub
commit 726f34cb42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -129,7 +129,8 @@ npm run lint
Logging is done by both rust-analyzer and VS Code, so it might be tricky to figure out where logs go.
Inside rust-analyzer, we use the standard `log` crate for logging, and `env_logger` for logging frontend.
Inside rust-analyzer, we use the [`tracing`](https://docs.rs/tracing/) crate for logging,
and [`tracing-subscriber`](https://docs.rs/tracing-subscriber) for logging frontend.
By default, log goes to stderr, but the stderr itself is processed by VS Code.
`--log-file <PATH>` CLI argument allows logging to file.
Setting the `RA_LOG_FILE=<PATH>` environment variable will also log to file, it will also override `--log-file`.