From 47f52ee1f598aca40f241daeabf3fd0bbf371087 Mon Sep 17 00:00:00 2001 From: vms Date: Tue, 8 Sep 2020 13:39:22 +0300 Subject: [PATCH] init repl env logger on the start --- Cargo.lock | 16 +++++++++++++++- tools/repl/Cargo.toml | 1 + tools/repl/src/main.rs | 2 ++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index ef9750df..a5caa095 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -500,6 +500,19 @@ dependencies = [ "termcolor", ] +[[package]] +name = "env_logger" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + [[package]] name = "erased-serde" version = "0.3.12" @@ -759,6 +772,7 @@ version = "0.1.2" dependencies = [ "anyhow", "clap", + "env_logger 0.7.1", "fluence-app-service", "itertools", "rustop", @@ -1957,7 +1971,7 @@ dependencies = [ "chrono", "clap", "derive_builder", - "env_logger", + "env_logger 0.6.2", "fuzzy-matcher", "lazy_static", "log", diff --git a/tools/repl/Cargo.toml b/tools/repl/Cargo.toml index dd9d7df0..e9881122 100644 --- a/tools/repl/Cargo.toml +++ b/tools/repl/Cargo.toml @@ -19,6 +19,7 @@ clap = "2.33.1" serde_json = "1.0.57" wasmer-wasi = { package = "wasmer-wasi-fl", version = "0.17.0"} +env_logger = "0.7.1" rustyline = { version = "6.1.2", features = ["with-fuzzy"] } rustyline-derive = "0.3.1" rustop = "1.1.0" diff --git a/tools/repl/src/main.rs b/tools/repl/src/main.rs index 88484364..3b6fb139 100644 --- a/tools/repl/src/main.rs +++ b/tools/repl/src/main.rs @@ -47,6 +47,8 @@ const HISTORY_FILE_PATH: &str = ".repl_history"; pub(crate) type Result = std::result::Result; fn main() -> Result<()> { + env_logger::init(); + let (args, _) = rustop::opts! { synopsis "Fluence Application service REPL"; param config_file_path: Option, desc: "Path to a service config";