diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-30 19:19:28 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-30 19:19:28 +0000 |
commit | 780f476b4f438d473bc2e2299c2b8bf0a6fb9257 (patch) | |
tree | de3a3eceb92c9604bc14c12885ce887186c39dd3 /crates/ra_cli | |
parent | 9712889ee4c6cffa37c2ace5da9b00bf29adab56 (diff) | |
parent | 3fe539ce51f417605a6da6bc3c6d135053b1ee67 (diff) |
Merge #2451
2451: Use env_logger instead of flexi_logger r=matklad a=AlexanderEkdahl
This fixes https://github.com/rust-analyzer/rust-analyzer/issues/2335
- By default only `error` will be printed. From what I can tell this matches the current behaviour. Configured through `RUST_LOG`.
- I looked through the optional dependencies for `env_logger`and I have only enabled `human_time`. Without this feature no timestamp will be shown for log messages.
- `RA_LOG_DIR` feature is removed
This PR adds 2 new dependencies(`env_logger` and `human_time`) and removes 6 dependencies.
Co-authored-by: Alexander Ekdahl <[email protected]>
Diffstat (limited to 'crates/ra_cli')
-rw-r--r-- | crates/ra_cli/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/ra_cli/src/main.rs | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_cli/Cargo.toml b/crates/ra_cli/Cargo.toml index c7e0d0f0f..21a37c7bf 100644 --- a/crates/ra_cli/Cargo.toml +++ b/crates/ra_cli/Cargo.toml | |||
@@ -7,7 +7,7 @@ publish = false | |||
7 | 7 | ||
8 | [dependencies] | 8 | [dependencies] |
9 | pico-args = "0.3.0" | 9 | pico-args = "0.3.0" |
10 | flexi_logger = "0.14.0" | 10 | env_logger = { version = "0.7.1", default-features = false, features = ["humantime"] } |
11 | 11 | ||
12 | ra_syntax = { path = "../ra_syntax" } | 12 | ra_syntax = { path = "../ra_syntax" } |
13 | ra_ide = { path = "../ra_ide" } | 13 | ra_ide = { path = "../ra_ide" } |
diff --git a/crates/ra_cli/src/main.rs b/crates/ra_cli/src/main.rs index fe847e611..3808590ab 100644 --- a/crates/ra_cli/src/main.rs +++ b/crates/ra_cli/src/main.rs | |||
@@ -7,7 +7,6 @@ mod progress_report; | |||
7 | 7 | ||
8 | use std::{error::Error, fmt::Write, io::Read}; | 8 | use std::{error::Error, fmt::Write, io::Read}; |
9 | 9 | ||
10 | use flexi_logger::Logger; | ||
11 | use pico_args::Arguments; | 10 | use pico_args::Arguments; |
12 | use ra_ide::{file_structure, Analysis}; | 11 | use ra_ide::{file_structure, Analysis}; |
13 | use ra_prof::profile; | 12 | use ra_prof::profile; |
@@ -32,7 +31,7 @@ impl Verbosity { | |||
32 | } | 31 | } |
33 | 32 | ||
34 | fn main() -> Result<()> { | 33 | fn main() -> Result<()> { |
35 | Logger::with_env_or_str("error").start()?; | 34 | env_logger::try_init()?; |
36 | 35 | ||
37 | let subcommand = match std::env::args_os().nth(1) { | 36 | let subcommand = match std::env::args_os().nth(1) { |
38 | None => { | 37 | None => { |