all: initializing logger at start

This commit is contained in:
Dave Hrycyszyn
2020-01-22 16:34:42 +00:00
parent c592ac6655
commit ac61196fc6
3 changed files with 4 additions and 9 deletions
+2
View File
@@ -5,6 +5,8 @@ mod mix_peer;
mod node;
fn main() {
pretty_env_logger::init();
let arg_matches = App::new("Nym Mixnode")
.version(built_info::PKG_VERSION)
.author("Nymtech")
+2
View File
@@ -8,6 +8,8 @@ use std::process;
pub mod provider;
fn main() {
pretty_env_logger::init();
let arg_matches = App::new("Nym Service Provider")
.version(built_info::PKG_VERSION)
.author("Nymtech")
-9
View File
@@ -1,7 +1,6 @@
use crate::validator::config::Config;
use crate::validator::Validator;
use clap::{App, Arg, ArgMatches, SubCommand};
use dotenv;
use log::{error, trace};
use std::process;
use toml;
@@ -9,14 +8,6 @@ use toml;
mod validator;
fn main() {
// load environment variables from .env file
if dotenv::dotenv().is_err() {
eprint!("failed to read .env file - the logging is unlikely to work correctly")
}
// if we want to log to file or use different logger, we'd need to replace it here.
// a better alternative, but way more complex would be `slog` crate - we should
// perhaps research it at some point.
pretty_env_logger::init();
let arg_matches = App::new("Nym Validator")