diff options
Diffstat (limited to 'crates/ra_lsp_server/src')
-rw-r--r-- | crates/ra_lsp_server/src/main.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_lsp_server/src/main.rs b/crates/ra_lsp_server/src/main.rs index 9ba972562..4497980e5 100644 --- a/crates/ra_lsp_server/src/main.rs +++ b/crates/ra_lsp_server/src/main.rs | |||
@@ -6,11 +6,11 @@ use ra_lsp_server::Result; | |||
6 | 6 | ||
7 | fn main() -> Result<()> { | 7 | fn main() -> Result<()> { |
8 | ::std::env::set_var("RUST_BACKTRACE", "short"); | 8 | ::std::env::set_var("RUST_BACKTRACE", "short"); |
9 | Logger::with_env_or_str("error") | 9 | let logger = Logger::with_env_or_str("error").duplicate_to_stderr(Duplicate::All); |
10 | .duplicate_to_stderr(Duplicate::All) | 10 | match ::std::env::var("RA_INTERNAL_MODE") { |
11 | .log_to_file() | 11 | Ok(ref v) if v == "1" => logger.log_to_file().directory("log").start()?, |
12 | .directory("log") | 12 | _ => logger.start()?, |
13 | .start()?; | 13 | }; |
14 | log::info!("lifecycle: server started"); | 14 | log::info!("lifecycle: server started"); |
15 | match ::std::panic::catch_unwind(main_inner) { | 15 | match ::std::panic::catch_unwind(main_inner) { |
16 | Ok(res) => { | 16 | Ok(res) => { |