mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-14 14:13:58 +00:00
output to log file if RA_LOG_FILE is defined in environment
This commit is contained in:
parent
9d60d75e14
commit
baa060a994
1 changed files with 8 additions and 1 deletions
|
@ -60,7 +60,14 @@ fn try_main() -> Result<()> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_logging(flags.log_file.as_deref(), flags.no_log_buffering)?;
|
let mut log_file = flags.log_file.as_deref();
|
||||||
|
|
||||||
|
let env_log_file = env::var("RA_LOG_FILE").ok();
|
||||||
|
if let Some(env_log_file) = env_log_file.as_deref() {
|
||||||
|
log_file = Some(Path::new(env_log_file));
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_logging(log_file, flags.no_log_buffering)?;
|
||||||
let verbosity = flags.verbosity();
|
let verbosity = flags.verbosity();
|
||||||
|
|
||||||
match flags.subcommand {
|
match flags.subcommand {
|
||||||
|
|
Loading…
Reference in a new issue