init repl env logger on the start

This commit is contained in:
vms 2020-09-08 13:39:22 +03:00
parent 2768bc3aca
commit 47f52ee1f5
3 changed files with 18 additions and 1 deletions

16
Cargo.lock generated
View File

@ -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",

View File

@ -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"

View File

@ -47,6 +47,8 @@ const HISTORY_FILE_PATH: &str = ".repl_history";
pub(crate) type Result<T> = std::result::Result<T, anyhow::Error>;
fn main() -> Result<()> {
env_logger::init();
let (args, _) = rustop::opts! {
synopsis "Fluence Application service REPL";
param config_file_path: Option<String>, desc: "Path to a service config";