diff options
Diffstat (limited to 'crates/rust-analyzer/src/bin/main.rs')
-rw-r--r-- | crates/rust-analyzer/src/bin/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/rust-analyzer/src/bin/main.rs b/crates/rust-analyzer/src/bin/main.rs index 1d6e5478b..9a54193f6 100644 --- a/crates/rust-analyzer/src/bin/main.rs +++ b/crates/rust-analyzer/src/bin/main.rs | |||
@@ -28,7 +28,7 @@ fn main() { | |||
28 | 28 | ||
29 | fn try_main() -> Result<()> { | 29 | fn try_main() -> Result<()> { |
30 | let args = args::Args::parse()?; | 30 | let args = args::Args::parse()?; |
31 | setup_logging(args.log_file)?; | 31 | setup_logging(args.log_file, args.no_buffering)?; |
32 | match args.command { | 32 | match args.command { |
33 | args::Command::RunServer => run_server()?, | 33 | args::Command::RunServer => run_server()?, |
34 | args::Command::PrintConfigSchema => { | 34 | args::Command::PrintConfigSchema => { |
@@ -56,7 +56,7 @@ fn try_main() -> Result<()> { | |||
56 | Ok(()) | 56 | Ok(()) |
57 | } | 57 | } |
58 | 58 | ||
59 | fn setup_logging(log_file: Option<PathBuf>) -> Result<()> { | 59 | fn setup_logging(log_file: Option<PathBuf>, flush_file: bool) -> Result<()> { |
60 | env::set_var("RUST_BACKTRACE", "short"); | 60 | env::set_var("RUST_BACKTRACE", "short"); |
61 | 61 | ||
62 | let log_file = match log_file { | 62 | let log_file = match log_file { |
@@ -69,7 +69,7 @@ fn setup_logging(log_file: Option<PathBuf>) -> Result<()> { | |||
69 | None => None, | 69 | None => None, |
70 | }; | 70 | }; |
71 | let filter = env::var("RA_LOG").ok(); | 71 | let filter = env::var("RA_LOG").ok(); |
72 | logger::Logger::new(log_file, filter.as_deref()).install(); | 72 | logger::Logger::new(log_file, flush_file, filter.as_deref()).install(); |
73 | 73 | ||
74 | tracing_setup::setup_tracing()?; | 74 | tracing_setup::setup_tracing()?; |
75 | 75 | ||