about summary refs log tree commit diff
path: root/docs/dev
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-06-21 21:42:02 +0000
committerGitHub <noreply@github.com>2021-06-21 21:42:02 +0000
commit37dc2dfada170c28237f7bd20dec6476a420df32 (patch)
treeeaa027c4c988548ba5843d1c5382ce808e320435 /docs/dev
parentafe056eef1869d1733f0d62d36f15d7db3ccfa54 (diff)
parentceeee5e3c6e2ab24d6d83a1e000780da537c1507 (diff)
downloadrust-37dc2dfada170c28237f7bd20dec6476a420df32.tar.gz
rust-37dc2dfada170c28237f7bd20dec6476a420df32.zip
Merge #9348
9348: output to log file if RA_LOG_FILE is defined in environment r=rezural a=rezural

This adds a check for RA_LOG_FILE, and logs to that if defined. It currently overrides flags.log_file. If this is undesirable, I will add a check.

Co-authored-by: rezural <rezural@protonmail.com>
Diffstat (limited to 'docs/dev')
-rw-r--r--docs/dev/README.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/dev/README.md b/docs/dev/README.md
index e81f1e74c38..a394b85010c 100644
--- a/docs/dev/README.md
+++ b/docs/dev/README.md
@@ -131,7 +131,8 @@ Logging is done by both rust-analyzer and VS Code, so it might be tricky to figu
 
 Inside rust-analyzer, we use the standard `log` crate for logging, and `env_logger` 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.
+`--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`.
 
 To see stderr in the running VS Code instance, go to the "Output" tab of the panel and select `rust-analyzer`.
 This shows `eprintln!` as well.