diff --git a/Cargo.lock b/Cargo.lock index 6e1f7f87a7..1ee04051d2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5173,6 +5173,7 @@ dependencies = [ "futures 0.3.26", "log", "log-mdc", + "log4rs", "nom 7.1.3", "qrcode", "rustyline", @@ -5450,6 +5451,7 @@ dependencies = [ "digest 0.9.0", "futures 0.3.26", "log", + "log4rs", "qrcode", "rand 0.7.3", "regex", @@ -5785,6 +5787,7 @@ dependencies = [ "futures 0.3.26", "hex", "log", + "log4rs", "native-tls", "num_cpus", "prost-types 0.9.0", diff --git a/applications/tari_base_node/Cargo.toml b/applications/tari_base_node/Cargo.toml index 9187cd5d66..bb2ab0093a 100644 --- a/applications/tari_base_node/Cargo.toml +++ b/applications/tari_base_node/Cargo.toml @@ -38,6 +38,7 @@ futures = { version = "^0.3.16", default-features = false, features = ["alloc"] qrcode = { version = "0.12" } log = { version = "0.4.8", features = ["std"] } log-mdc = "0.1.0" +log4rs = { version = "1.2.0", default_features = false, features = ["config_parsing", "threshold_filter", "yaml_format", "console_appender", "rolling_file_appender", "compound_policy", "size_trigger", "fixed_window_roller"] } nom = "7.1.0" rustyline = "9.0" rustyline-derive = "0.5" @@ -59,3 +60,9 @@ libtor = ["tari_libtor"] [build-dependencies] tari_features = { version = "0.50.0-pre.0", path = "../../common/tari_features"} + +[package.metadata.cargo-machete] +ignored = [ + # We need to specify extra features for log4rs even though it is not used directly in this crate + "log4rs" +] diff --git a/applications/tari_console_wallet/Cargo.toml b/applications/tari_console_wallet/Cargo.toml index aeb866a3a5..ba4637e0f1 100644 --- a/applications/tari_console_wallet/Cargo.toml +++ b/applications/tari_console_wallet/Cargo.toml @@ -35,6 +35,7 @@ config = "0.13.0" crossterm = { version = "0.25.0" } digest = "0.9.0" futures = { version = "^0.3.16", default-features = false, features = ["alloc"] } +log4rs = { version = "1.2.0", default_features = false, features = ["config_parsing", "threshold_filter", "yaml_format", "console_appender", "rolling_file_appender", "compound_policy", "size_trigger", "fixed_window_roller"] } log = { version = "0.4.8", features = ["std"] } qrcode = { version = "0.12" } rand = "0.7.3" @@ -71,4 +72,5 @@ avx2 = ["tari_core/avx2", "tari_crypto/simd_backend", "tari_wallet/avx2", "tari_ libtor = ["tari_libtor"] [package.metadata.cargo-machete] -ignored = ["strum"] \ No newline at end of file +# We need to specify extra features for log4rs even though it is not used directly in this crate +ignored = ["strum", "log4rs"] diff --git a/applications/tari_miner/Cargo.toml b/applications/tari_miner/Cargo.toml index 81f1b67077..5090d8c1d8 100644 --- a/applications/tari_miner/Cargo.toml +++ b/applications/tari_miner/Cargo.toml @@ -23,6 +23,7 @@ clap = { version = "3.1.1", features = ["derive"] } crossbeam = "0.8" futures = "0.3" log = { version = "0.4", features = ["std"] } +log4rs = { version = "1.2.0", default_features = false, features = ["config_parsing", "threshold_filter", "yaml_format", "console_appender", "rolling_file_appender", "compound_policy", "size_trigger", "fixed_window_roller"] } num_cpus = "1.13" rand = "0.7.3" serde = { version = "1.0", default_features = false, features = ["derive"] } @@ -41,3 +42,9 @@ base64 = "0.13.0" prost-types = "0.9" chrono = { version = "0.4.19", default-features = false } config = "0.13.0" + +[package.metadata.cargo-machete] +ignored = [ + # We need to specify extra features for log4rs even though it is not used directly in this crate + "log4rs" +]