Skip to content

Commit

Permalink
fix: added missing log4rs features (#5356)
Browse files Browse the repository at this point in the history
Description
---
Added missing log4rs features to applications which use these features.

Motivation and Context
---
Base node panics because the sample log config uses a number of log4rs
features that are not compiled in.
The dependency was not added to the common lib as this adds extra
dependencies to a lot of libs and it breaks wasm build.

How Has This Been Tested?
---
Base node runs

What process can a PR reviewer use to test or verify this change?
---

<!-- Checklist -->
<!-- 1. Is the title of your PR in the form that would make nice release
notes? The title, excluding the conventional commit
tag, will be included exactly as is in the CHANGELOG, so please think
about it carefully. -->


Breaking Changes
---

- [x] None
- [ ] Requires data directory on base node to be deleted
- [ ] Requires hard fork
- [ ] Other - Please specify

<!-- Does this include a breaking change? If so, include this line as a
footer -->
<!-- BREAKING CHANGE: Description what the user should do, e.g. delete a
database, resync the chain -->
  • Loading branch information
sdbondi authored May 3, 2023
1 parent c72de0a commit b9031bb
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions applications/tari_base_node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
]
4 changes: 3 additions & 1 deletion applications/tari_console_wallet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"]
# We need to specify extra features for log4rs even though it is not used directly in this crate
ignored = ["strum", "log4rs"]
7 changes: 7 additions & 0 deletions applications/tari_miner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand All @@ -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"
]

0 comments on commit b9031bb

Please sign in to comment.