From 09cb17e6aba8b762c22d805e05f6897c7f0d9d2d Mon Sep 17 00:00:00 2001 From: Dave Hrycyszyn Date: Wed, 22 Jan 2020 16:29:59 +0000 Subject: [PATCH] all: using pretty_env_logger pretty much everywhere --- Cargo.lock | 21 +++++++++++++++++++++ common/addressing/Cargo.toml | 2 ++ common/clients/directory-client/Cargo.toml | 2 ++ common/clients/mix-client/Cargo.toml | 1 + common/clients/provider-client/Cargo.toml | 1 + common/clients/validator-client/Cargo.toml | 2 ++ common/crypto/Cargo.toml | 2 ++ common/healthcheck/Cargo.toml | 1 + common/pemstore/Cargo.toml | 2 ++ common/topology/Cargo.toml | 3 ++- mixnode/Cargo.toml | 3 ++- nym-client/Cargo.toml | 4 ++-- nym-client/src/main.rs | 2 +- sfw-provider/Cargo.toml | 3 ++- validator/Cargo.toml | 4 ++-- 15 files changed, 45 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 66d9693e54..9930dc746b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,6 +3,10 @@ [[package]] name = "addressing" version = "0.1.0" +dependencies = [ + "log", + "pretty_env_logger", +] [[package]] name = "adler32" @@ -458,6 +462,8 @@ version = "0.1.0" dependencies = [ "base64 0.11.0", "curve25519-dalek", + "log", + "pretty_env_logger", "rand 0.7.2", "rand_os", ] @@ -514,7 +520,9 @@ dependencies = [ name = "directory-client" version = "0.1.0" dependencies = [ + "log", "mockito", + "pretty_env_logger", "reqwest", "serde", "topology", @@ -856,6 +864,7 @@ dependencies = [ "itertools", "log", "mix-client", + "pretty_env_logger", "provider-client", "serde", "serde_derive", @@ -1258,6 +1267,7 @@ version = "0.1.0" dependencies = [ "addressing", "log", + "pretty_env_logger", "rand 0.7.2", "rand_distr", "sphinx", @@ -1361,6 +1371,7 @@ dependencies = [ "mix-client", "pem", "pemstore", + "pretty_env_logger", "provider-client", "reqwest", "serde", @@ -1385,6 +1396,7 @@ dependencies = [ "directory-client", "futures 0.3.1", "log", + "pretty_env_logger", "sphinx", "tokio 0.2.9", ] @@ -1403,6 +1415,7 @@ dependencies = [ "hex", "hmac", "log", + "pretty_env_logger", "rand 0.7.2", "serde", "serde_json", @@ -1510,7 +1523,9 @@ name = "pemstore" version = "0.1.0" dependencies = [ "crypto", + "log", "pem", + "pretty_env_logger", ] [[package]] @@ -1612,6 +1627,7 @@ version = "0.1.0" dependencies = [ "futures 0.3.1", "log", + "pretty_env_logger", "sfw-provider-requests", "sphinx", "tokio 0.2.9", @@ -2419,6 +2435,7 @@ dependencies = [ "curve25519-dalek", "itertools", "log", + "pretty_env_logger", "rand 0.7.2", "serde", "sphinx", @@ -2544,6 +2561,10 @@ dependencies = [ [[package]] name = "validator-client" version = "0.1.0" +dependencies = [ + "log", + "pretty_env_logger", +] [[package]] name = "vcpkg" diff --git a/common/addressing/Cargo.toml b/common/addressing/Cargo.toml index 3ffea36a3a..304a25dbc9 100644 --- a/common/addressing/Cargo.toml +++ b/common/addressing/Cargo.toml @@ -7,3 +7,5 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +log = "0.4" +pretty_env_logger = "0.3" \ No newline at end of file diff --git a/common/clients/directory-client/Cargo.toml b/common/clients/directory-client/Cargo.toml index 019fd4700a..a9e30636e0 100644 --- a/common/clients/directory-client/Cargo.toml +++ b/common/clients/directory-client/Cargo.toml @@ -7,6 +7,8 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +log = "0.4" +pretty_env_logger = "0.3" reqwest = "0.9.22" serde = { version = "1.0.104", features = ["derive"] } diff --git a/common/clients/mix-client/Cargo.toml b/common/clients/mix-client/Cargo.toml index 362fad3f0a..a7ef6e35c8 100644 --- a/common/clients/mix-client/Cargo.toml +++ b/common/clients/mix-client/Cargo.toml @@ -8,6 +8,7 @@ edition = "2018" [dependencies] log = "0.4.8" +pretty_env_logger = "0.3" rand = "0.7.2" rand_distr = "0.2.2" tokio = { version = "0.2", features = ["full"] } diff --git a/common/clients/provider-client/Cargo.toml b/common/clients/provider-client/Cargo.toml index 602f7d2725..450a76cb2b 100644 --- a/common/clients/provider-client/Cargo.toml +++ b/common/clients/provider-client/Cargo.toml @@ -9,6 +9,7 @@ edition = "2018" [dependencies] futures = "0.3.1" log = "0.4.8" +pretty_env_logger = "0.3" tokio = { version = "0.2", features = ["full"] } ## internal diff --git a/common/clients/validator-client/Cargo.toml b/common/clients/validator-client/Cargo.toml index 1d633f29ba..d9e12aefc7 100644 --- a/common/clients/validator-client/Cargo.toml +++ b/common/clients/validator-client/Cargo.toml @@ -7,3 +7,5 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +log = "0.4" +pretty_env_logger = "0.3" \ No newline at end of file diff --git a/common/crypto/Cargo.toml b/common/crypto/Cargo.toml index 48494e850b..23790a23c8 100644 --- a/common/crypto/Cargo.toml +++ b/common/crypto/Cargo.toml @@ -9,5 +9,7 @@ edition = "2018" [dependencies] base64 = "0.11.0" curve25519-dalek = "1.2.3" +log = "0.4" +pretty_env_logger = "0.3" rand = "0.7.2" rand_os = "0.1" diff --git a/common/healthcheck/Cargo.toml b/common/healthcheck/Cargo.toml index eb82f95fd5..918efa0df9 100644 --- a/common/healthcheck/Cargo.toml +++ b/common/healthcheck/Cargo.toml @@ -10,6 +10,7 @@ edition = "2018" futures = "0.3.1" itertools = "0.8.2" log = "0.4.8" +pretty_env_logger = "0.3" serde = "1.0.104" serde_derive = "1.0.104" tokio = { version = "0.2", features = ["full"] } diff --git a/common/pemstore/Cargo.toml b/common/pemstore/Cargo.toml index 2774ec2ccd..d66ba1aff5 100644 --- a/common/pemstore/Cargo.toml +++ b/common/pemstore/Cargo.toml @@ -7,7 +7,9 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +log = "0.4" pem = "0.7.0" +pretty_env_logger = "0.3" ## internal crypto = {path = "../crypto"} diff --git a/common/topology/Cargo.toml b/common/topology/Cargo.toml index 628672da6e..eab611a86a 100644 --- a/common/topology/Cargo.toml +++ b/common/topology/Cargo.toml @@ -10,7 +10,8 @@ edition = "2018" base64 = "0.11.0" curve25519-dalek = "1.2.3" itertools = "0.8.2" -log = "0.4.8" +log = "0.4" +pretty_env_logger = "0.3" rand = "0.7.2" serde = { version = "1.0.104", features = ["derive"] } diff --git a/mixnode/Cargo.toml b/mixnode/Cargo.toml index 45d800f1d8..602d119bad 100644 --- a/mixnode/Cargo.toml +++ b/mixnode/Cargo.toml @@ -12,7 +12,8 @@ base64 = "0.11.0" clap = "2.33.0" curve25519-dalek = "1.2.3" futures = "0.3.1" -log = "0.4.8" +log = "0.4" +pretty_env_logger = "0.3" tokio = { version = "0.2", features = ["full"] } ## internal diff --git a/nym-client/Cargo.toml b/nym-client/Cargo.toml index d80d6fcdde..782b68d31e 100644 --- a/nym-client/Cargo.toml +++ b/nym-client/Cargo.toml @@ -16,11 +16,11 @@ base64 = "0.11.0" clap = "2.33.0" curve25519-dalek = "1.2.3" dirs = "2.0.2" -env_logger = "0.7.1" futures = "0.3.1" hex = "0.4.0" -log = "0.4.8" +log = "0.4" pem = "0.7.0" +pretty_env_logger = "0.3" reqwest = "0.9.22" serde = { version = "1.0.104", features = ["derive"] } serde_json = "1.0.44" diff --git a/nym-client/src/main.rs b/nym-client/src/main.rs index a3f20596b0..5dd19e9a7c 100644 --- a/nym-client/src/main.rs +++ b/nym-client/src/main.rs @@ -7,7 +7,7 @@ pub mod config; mod sockets; fn main() { - env_logger::init(); + pretty_env_logger::init(); let arg_matches = App::new("Nym Client") .version(built_info::PKG_VERSION) diff --git a/sfw-provider/Cargo.toml b/sfw-provider/Cargo.toml index d76965a12f..1fe97babcf 100644 --- a/sfw-provider/Cargo.toml +++ b/sfw-provider/Cargo.toml @@ -13,7 +13,8 @@ clap = "2.33.0" curve25519-dalek = "1.2.3" hex = "0.4.0" futures = "0.3.1" -log = "0.4.8" +log = "0.4" +pretty_env_logger = "0.3" rand = "0.7.2" tokio = { version = "0.2.4", features = ["full"] } sha2 = "0.8.0" diff --git a/validator/Cargo.toml b/validator/Cargo.toml index 2b97dcb8f5..ead9eade21 100644 --- a/validator/Cargo.toml +++ b/validator/Cargo.toml @@ -12,8 +12,8 @@ clap = "2.33.0" # Read notes https://crates.io/crates/dotenv - tl;dr: don't use in production, set environmental variables properly. dotenv = "0.15.0" futures = "0.3.1" -log = "0.4.8" -pretty_env_logger = "0.3.1" +log = "0.4" +pretty_env_logger = "0.3" serde = "1.0.104" serde_derive = "1.0.104" tokio = { version = "0.2", features = ["full"] }