mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
PR issuse resolved
This commit is contained in:
parent
ef02c3c038
commit
9b73f80959
9 changed files with 30 additions and 10 deletions
|
@ -3,6 +3,7 @@ use flexi_logger::{Duplicate, Logger};
|
|||
use gen_lsp_server::{run_server, stdio_transport};
|
||||
|
||||
use ra_lsp_server::{Result, InitializationOptions};
|
||||
use ra_prof;
|
||||
|
||||
fn main() -> Result<()> {
|
||||
::std::env::set_var("RUST_BACKTRACE", "short");
|
||||
|
@ -11,6 +12,15 @@ fn main() -> Result<()> {
|
|||
Ok(ref v) if v == "1" => logger.log_to_file().directory("log").start()?,
|
||||
_ => logger.start()?,
|
||||
};
|
||||
let prof_depth = match ::std::env::var("RA_PROFILE_DEPTH") {
|
||||
Ok(ref d) => d.parse()?,
|
||||
_ => 0,
|
||||
};
|
||||
let profile_allowed = match ::std::env::var("RA_PROFILE") {
|
||||
Ok(ref p) => p.split(";").map(String::from).collect(),
|
||||
_ => Vec::new(),
|
||||
};
|
||||
ra_prof::set_filter(ra_prof::Filter::new(prof_depth, profile_allowed));
|
||||
log::info!("lifecycle: server started");
|
||||
match ::std::panic::catch_unwind(main_inner) {
|
||||
Ok(res) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue