Use env_logger in ra_cli

This commit is contained in:
Alexander Ekdahl 2019-11-29 19:20:48 -05:00
parent 484acc8a61
commit 9c01c0dcb5
3 changed files with 28 additions and 4 deletions

View file

@ -7,7 +7,7 @@ publish = false
[dependencies]
pico-args = "0.3.0"
flexi_logger = "0.14.0"
log = "0.4"
ra_syntax = { path = "../ra_syntax" }
ra_ide = { path = "../ra_ide" }
@ -19,3 +19,8 @@ ra_db = { path = "../ra_db" }
path = "../ra_prof"
# features = [ "cpu_profiler" ]
# features = [ "jemalloc" ]
[dependencies.env_logger]
version = "0.7.1"
default-features = false
features = ["humantime"]

View file

@ -7,7 +7,6 @@ mod progress_report;
use std::{error::Error, fmt::Write, io::Read};
use flexi_logger::Logger;
use pico_args::Arguments;
use ra_ide::{file_structure, Analysis};
use ra_prof::profile;
@ -32,7 +31,7 @@ impl Verbosity {
}
fn main() -> Result<()> {
Logger::with_env_or_str("error").start()?;
env_logger::try_init()?;
let subcommand = match std::env::args_os().nth(1) {
None => {