From 72e229fcb35f6056183f681e0d16c4fff8e5e381 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 11 May 2020 19:14:12 +0200 Subject: Use RA_LOG instead of RUST_LOG for logging RUST_LOG might be set up for debugging the user's problem, slowing down rust-analyzer considerably. That's the same reason why rustc uses RUSTC_LOG. --- crates/rust-analyzer/src/bin/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates') diff --git a/crates/rust-analyzer/src/bin/main.rs b/crates/rust-analyzer/src/bin/main.rs index 22a84b50c..001f277e6 100644 --- a/crates/rust-analyzer/src/bin/main.rs +++ b/crates/rust-analyzer/src/bin/main.rs @@ -60,7 +60,7 @@ fn main() -> Result<()> { fn setup_logging() -> Result<()> { std::env::set_var("RUST_BACKTRACE", "short"); - env_logger::try_init()?; + env_logger::try_init_from_env("RA_LOG")?; ra_prof::init(); Ok(()) } -- cgit v1.2.3