aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src
diff options
context:
space:
mode:
authorAlexander Ekdahl <[email protected]>2019-11-30 00:35:03 +0000
committerAlexander Ekdahl <[email protected]>2019-11-30 00:35:03 +0000
commiteb4e70fc676a97a7b411f372be1727df51a8906a (patch)
treefdd4a2893dcab15a3c72ed2c814070cb8f5541e4 /crates/ra_lsp_server/src
parent9c01c0dcb5308d8d50ddf2d3fad6599fbff7d3dd (diff)
Remove flexi_logger from ra_lsp_server
Diffstat (limited to 'crates/ra_lsp_server/src')
-rw-r--r--crates/ra_lsp_server/src/main.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/crates/ra_lsp_server/src/main.rs b/crates/ra_lsp_server/src/main.rs
index e13c8ca14..8076a7fa5 100644
--- a/crates/ra_lsp_server/src/main.rs
+++ b/crates/ra_lsp_server/src/main.rs
@@ -1,6 +1,5 @@
1//! `ra_lsp_server` binary 1//! `ra_lsp_server` binary
2 2
3use flexi_logger::{Duplicate, Logger};
4use lsp_server::Connection; 3use lsp_server::Connection;
5use ra_lsp_server::{show_message, Result, ServerConfig}; 4use ra_lsp_server::{show_message, Result, ServerConfig};
6use ra_prof; 5use ra_prof;
@@ -14,11 +13,7 @@ fn main() -> Result<()> {
14fn setup_logging() -> Result<()> { 13fn setup_logging() -> Result<()> {
15 std::env::set_var("RUST_BACKTRACE", "short"); 14 std::env::set_var("RUST_BACKTRACE", "short");
16 15
17 let logger = Logger::with_env_or_str("error").duplicate_to_stderr(Duplicate::All); 16 env_logger::try_init()?;
18 match std::env::var("RA_LOG_DIR") {
19 Ok(ref v) if v == "1" => logger.log_to_file().directory("log").start()?,
20 _ => logger.start()?,
21 };
22 17
23 ra_prof::set_filter(match std::env::var("RA_PROFILE") { 18 ra_prof::set_filter(match std::env::var("RA_PROFILE") {
24 Ok(spec) => ra_prof::Filter::from_spec(&spec), 19 Ok(spec) => ra_prof::Filter::from_spec(&spec),