mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
docs(logging): use tracing
for logging
This commit is contained in:
parent
796bfccac4
commit
b8ef2acadb
1 changed files with 4 additions and 3 deletions
|
@ -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.
|
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.
|
By default, log goes to stderr, but the stderr itself is processed by VS Code.
|
||||||
`--log-file <PATH>` CLI argument allows logging to file.
|
`--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`.
|
Setting the `RA_LOG_FILE=<PATH>` environment variable will also log to file, it will also override `--log-file`.
|
||||||
|
|
Loading…
Reference in a new issue