util/cli: refactoring loading log config & add path for log file

This commit is contained in:
ghassmo
2022-05-31 04:27:42 +03:00
parent 16c3a85e8e
commit 01ac20aab4
8 changed files with 55 additions and 37 deletions

View File

@@ -6,12 +6,10 @@ use async_std::{
net::{TcpListener, TcpStream},
sync::{Arc, Mutex},
};
use easy_parallel::Parallel;
use futures::{io::BufReader, AsyncBufReadExt, AsyncReadExt, FutureExt};
use fxhash::FxHashMap;
use log::{debug, error, info, warn};
use rand::rngs::OsRng;
use simplelog::{ColorChoice, TermLogger, TerminalMode};
use smol::future;
use structopt_toml::StructOptToml;
use url::Url;
@@ -21,7 +19,7 @@ use darkfi::{
raft::{NetMsg, ProtocolRaft, Raft},
rpc::server::listen_and_serve,
util::{
cli::{log_config, spawn_config},
cli::{get_log_config, get_log_level, spawn_config},
path::{expand_path, get_config_path},
},
Error, Result,