aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Ekdahl <[email protected]>2019-11-30 00:20:48 +0000
committerAlexander Ekdahl <[email protected]>2019-11-30 00:20:48 +0000
commit9c01c0dcb5308d8d50ddf2d3fad6599fbff7d3dd (patch)
treea10e9604dc02aa2f10a99ca44f3452c89a91475b
parent484acc8a61d599662ed63a4cbda091d38a982551 (diff)
Use env_logger in ra_cli
-rw-r--r--Cargo.lock22
-rw-r--r--crates/ra_cli/Cargo.toml7
-rw-r--r--crates/ra_cli/src/main.rs3
3 files changed, 28 insertions, 4 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 2557b5e59..d418f2d96 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -324,6 +324,15 @@ version = "0.3.6"
324source = "registry+https://github.com/rust-lang/crates.io-index" 324source = "registry+https://github.com/rust-lang/crates.io-index"
325 325
326[[package]] 326[[package]]
327name = "env_logger"
328version = "0.7.1"
329source = "registry+https://github.com/rust-lang/crates.io-index"
330dependencies = [
331 "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
332 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
333]
334
335[[package]]
327name = "filetime" 336name = "filetime"
328version = "0.2.8" 337version = "0.2.8"
329source = "registry+https://github.com/rust-lang/crates.io-index" 338source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -454,6 +463,14 @@ dependencies = [
454] 463]
455 464
456[[package]] 465[[package]]
466name = "humantime"
467version = "1.3.0"
468source = "registry+https://github.com/rust-lang/crates.io-index"
469dependencies = [
470 "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
471]
472
473[[package]]
457name = "idna" 474name = "idna"
458version = "0.2.0" 475version = "0.2.0"
459source = "registry+https://github.com/rust-lang/crates.io-index" 476source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -928,7 +945,8 @@ dependencies = [
928name = "ra_cli" 945name = "ra_cli"
929version = "0.1.0" 946version = "0.1.0"
930dependencies = [ 947dependencies = [
931 "flexi_logger 0.14.5 (registry+https://github.com/rust-lang/crates.io-index)", 948 "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
949 "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
932 "pico-args 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 950 "pico-args 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
933 "ra_batch 0.1.0", 951 "ra_batch 0.1.0",
934 "ra_db 0.1.0", 952 "ra_db 0.1.0",
@@ -1843,6 +1861,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1843"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" 1861"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3"
1844"checksum ena 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8944dc8fa28ce4a38f778bd46bf7d923fe73eed5a439398507246c8e017e6f36" 1862"checksum ena 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8944dc8fa28ce4a38f778bd46bf7d923fe73eed5a439398507246c8e017e6f36"
1845"checksum encode_unicode 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" 1863"checksum encode_unicode 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
1864"checksum env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
1846"checksum filetime 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1ff6d4dab0aa0c8e6346d46052e93b13a16cf847b54ed357087c35011048cc7d" 1865"checksum filetime 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1ff6d4dab0aa0c8e6346d46052e93b13a16cf847b54ed357087c35011048cc7d"
1847"checksum fixedbitset 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "86d4de0081402f5e88cdac65c8dcdcc73118c1a7a465e2a05f0da05843a8ea33" 1866"checksum fixedbitset 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "86d4de0081402f5e88cdac65c8dcdcc73118c1a7a465e2a05f0da05843a8ea33"
1848"checksum flexi_logger 0.14.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a13ea6b8a4debecf47bf3966d56db0e21366bc3a3649ba159e1a9e6fdd36a4f4" 1867"checksum flexi_logger 0.14.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a13ea6b8a4debecf47bf3966d56db0e21366bc3a3649ba159e1a9e6fdd36a4f4"
@@ -1860,6 +1879,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1860"checksum globset 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "925aa2cac82d8834e2b2a4415b6f6879757fb5c0928fc445ae76461a12eed8f2" 1879"checksum globset 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "925aa2cac82d8834e2b2a4415b6f6879757fb5c0928fc445ae76461a12eed8f2"
1861"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" 1880"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205"
1862"checksum hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "307c3c9f937f38e3534b1d6447ecf090cafcc9744e4a6360e8b037b2cf5af120" 1881"checksum hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "307c3c9f937f38e3534b1d6447ecf090cafcc9744e4a6360e8b037b2cf5af120"
1882"checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"
1863"checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" 1883"checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9"
1864"checksum indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d7b3ea5827fcb9d4fda14bf4da5f136f0db2ae9c8f4bd4e2d1c6fde4e6db2" 1884"checksum indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712d7b3ea5827fcb9d4fda14bf4da5f136f0db2ae9c8f4bd4e2d1c6fde4e6db2"
1865"checksum inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40b54539f3910d6f84fbf9a643efd6e3aa6e4f001426c0329576128255994718" 1885"checksum inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40b54539f3910d6f84fbf9a643efd6e3aa6e4f001426c0329576128255994718"
diff --git a/crates/ra_cli/Cargo.toml b/crates/ra_cli/Cargo.toml
index c7e0d0f0f..9718b4b54 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]
9pico-args = "0.3.0" 9pico-args = "0.3.0"
10flexi_logger = "0.14.0" 10log = "0.4"
11 11
12ra_syntax = { path = "../ra_syntax" } 12ra_syntax = { path = "../ra_syntax" }
13ra_ide = { path = "../ra_ide" } 13ra_ide = { path = "../ra_ide" }
@@ -19,3 +19,8 @@ ra_db = { path = "../ra_db" }
19path = "../ra_prof" 19path = "../ra_prof"
20# features = [ "cpu_profiler" ] 20# features = [ "cpu_profiler" ]
21# features = [ "jemalloc" ] 21# features = [ "jemalloc" ]
22
23[dependencies.env_logger]
24version = "0.7.1"
25default-features = false
26features = ["humantime"]
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
8use std::{error::Error, fmt::Write, io::Read}; 8use std::{error::Error, fmt::Write, io::Read};
9 9
10use flexi_logger::Logger;
11use pico_args::Arguments; 10use pico_args::Arguments;
12use ra_ide::{file_structure, Analysis}; 11use ra_ide::{file_structure, Analysis};
13use ra_prof::profile; 12use ra_prof::profile;
@@ -32,7 +31,7 @@ impl Verbosity {
32} 31}
33 32
34fn main() -> Result<()> { 33fn 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 => {