diff --git a/Cargo.lock b/Cargo.lock index 258481776..85fde4a3c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -601,6 +601,7 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-debug-derive", "sp-finality-grandpa", "sp-inherents", "sp-io", @@ -2550,9 +2551,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" dependencies = [ "humantime", "is-terminal", @@ -2728,7 +2729,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84f2e425d9790201ba4af4630191feac6dcc98765b118d4d18e91d23c2353866" dependencies = [ - "env_logger 0.10.0", + "env_logger 0.10.1", "log", ] @@ -14460,6 +14461,7 @@ dependencies = [ "sp-block-builder", "sp-consensus-aura", "sp-core", + "sp-debug-derive", "sp-finality-grandpa", "sp-inherents", "sp-io", @@ -14517,6 +14519,7 @@ dependencies = [ name = "zrml-authorized" version = "0.4.2" dependencies = [ + "env_logger 0.10.1", "frame-benchmarking", "frame-support", "frame-system", @@ -14535,6 +14538,7 @@ name = "zrml-court" version = "0.4.2" dependencies = [ "arrayvec 0.7.4", + "env_logger 0.10.1", "frame-benchmarking", "frame-support", "frame-system", @@ -14558,6 +14562,7 @@ dependencies = [ name = "zrml-global-disputes" version = "0.4.2" dependencies = [ + "env_logger 0.10.1", "frame-benchmarking", "frame-support", "frame-system", @@ -14578,6 +14583,7 @@ dependencies = [ name = "zrml-liquidity-mining" version = "0.4.2" dependencies = [ + "env_logger 0.10.1", "frame-benchmarking", "frame-support", "frame-system", @@ -14596,6 +14602,7 @@ dependencies = [ name = "zrml-market-commons" version = "0.4.2" dependencies = [ + "env_logger 0.10.1", "frame-support", "frame-system", "pallet-balances", @@ -14612,6 +14619,7 @@ dependencies = [ name = "zrml-neo-swaps" version = "0.4.2" dependencies = [ + "env_logger 0.10.1", "fixed", "frame-benchmarking", "frame-support", @@ -14656,6 +14664,7 @@ dependencies = [ name = "zrml-orderbook" version = "0.4.2" dependencies = [ + "env_logger 0.10.1", "frame-benchmarking", "frame-support", "frame-system", @@ -14689,6 +14698,7 @@ dependencies = [ name = "zrml-parimutuel" version = "0.4.2" dependencies = [ + "env_logger 0.10.1", "frame-benchmarking", "frame-support", "frame-system", @@ -14710,6 +14720,7 @@ dependencies = [ name = "zrml-prediction-markets" version = "0.4.2" dependencies = [ + "env_logger 0.10.1", "frame-benchmarking", "frame-support", "frame-system", @@ -14773,6 +14784,7 @@ version = "0.4.2" dependencies = [ "arbitrary", "cfg-if", + "env_logger 0.10.1", "frame-support", "frame-system", "hashbrown 0.12.3", @@ -14804,6 +14816,7 @@ dependencies = [ name = "zrml-simple-disputes" version = "0.4.2" dependencies = [ + "env_logger 0.10.1", "frame-benchmarking", "frame-support", "frame-system", @@ -14824,6 +14837,7 @@ dependencies = [ name = "zrml-styx" version = "0.4.2" dependencies = [ + "env_logger 0.10.1", "frame-benchmarking", "frame-support", "frame-system", @@ -14840,6 +14854,7 @@ dependencies = [ name = "zrml-swaps" version = "0.4.2" dependencies = [ + "env_logger 0.10.1", "frame-benchmarking", "frame-support", "frame-system", diff --git a/Cargo.toml b/Cargo.toml index e4718530d..65b8416fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -190,6 +190,7 @@ sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "pol sp-block-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } sp-consensus-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } +sp-debug-derive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } sp-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } sp-inherents = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.38", default-features = false } @@ -246,6 +247,7 @@ zrml-swaps-runtime-api = { path = "zrml/swaps/runtime-api", default-features = f # Other (client) clap = "4.0.32" +env_logger = "0.10.1" jsonrpsee = "0.16.2" libfuzzer-sys = "0.4.7" more-asserts = "0.3.1" diff --git a/runtime/battery-station/Cargo.toml b/runtime/battery-station/Cargo.toml index 0d3543a38..1339f7a0e 100644 --- a/runtime/battery-station/Cargo.toml +++ b/runtime/battery-station/Cargo.toml @@ -37,6 +37,7 @@ scale-info = { workspace = true, features = ["derive"] } sp-api = { workspace = true } sp-block-builder = { workspace = true } sp-core = { workspace = true } +sp-debug-derive = { workspace = true } sp-inherents = { workspace = true } sp-offchain = { workspace = true } sp-runtime = { workspace = true } @@ -412,6 +413,8 @@ try-runtime = [ "cumulus-pallet-xcmp-queue?/try-runtime", "parachain-info?/try-runtime", ] +# Allow to print logs details (no wasm:stripped) +force-debug = ["sp-debug-derive/force-debug"] [package] authors = ["Zeitgeist PM "] diff --git a/runtime/zeitgeist/Cargo.toml b/runtime/zeitgeist/Cargo.toml index a51c91cbf..e651cb961 100644 --- a/runtime/zeitgeist/Cargo.toml +++ b/runtime/zeitgeist/Cargo.toml @@ -36,6 +36,7 @@ scale-info = { workspace = true, features = ["derive"] } sp-api = { workspace = true } sp-block-builder = { workspace = true } sp-core = { workspace = true } +sp-debug-derive = { workspace = true } sp-inherents = { workspace = true } sp-offchain = { workspace = true } sp-runtime = { workspace = true } @@ -401,6 +402,8 @@ try-runtime = [ "cumulus-pallet-xcmp-queue?/try-runtime", "parachain-info?/try-runtime", ] +# Allow to print logs details (no wasm:stripped) +force-debug = ["sp-debug-derive/force-debug"] [package] authors = ["Zeitgeist PM "] diff --git a/scripts/benchmarks/quick_check.sh b/scripts/benchmarks/quick_check.sh index 9ae754b68..c7d376aba 100755 --- a/scripts/benchmarks/quick_check.sh +++ b/scripts/benchmarks/quick_check.sh @@ -25,6 +25,7 @@ export PROFILE=release export PROFILE_DIR=release export ADDITIONAL_PARAMS=--detailed-log-output export EXECUTION=native -export ADDITIONAL_FEATURES="" +# force-debug for no output +export ADDITIONAL_FEATURES="force-debug" source ./scripts/benchmarks/run_benchmarks.sh diff --git a/zrml/authorized/Cargo.toml b/zrml/authorized/Cargo.toml index 616618158..be6763a46 100644 --- a/zrml/authorized/Cargo.toml +++ b/zrml/authorized/Cargo.toml @@ -9,6 +9,7 @@ zeitgeist-primitives = { workspace = true } zrml-market-commons = { workspace = true } [dev-dependencies] +env_logger = { workspace = true } pallet-balances = { workspace = true, features = ["default"] } pallet-timestamp = { workspace = true, features = ["default"] } sp-io = { workspace = true, features = ["default"] } diff --git a/zrml/authorized/src/mock.rs b/zrml/authorized/src/mock.rs index d3d8daf5a..33a67f6c5 100644 --- a/zrml/authorized/src/mock.rs +++ b/zrml/authorized/src/mock.rs @@ -201,6 +201,9 @@ impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` + let _ = env_logger::builder().is_test(true).try_init(); + pallet_balances::GenesisConfig:: { balances: self.balances } .assimilate_storage(&mut t) .unwrap(); diff --git a/zrml/court/Cargo.toml b/zrml/court/Cargo.toml index f88784959..4095f712c 100644 --- a/zrml/court/Cargo.toml +++ b/zrml/court/Cargo.toml @@ -13,6 +13,7 @@ zeitgeist-primitives = { workspace = true } zrml-market-commons = { workspace = true } [dev-dependencies] +env_logger = { workspace = true } pallet-balances = { workspace = true, features = ["default"] } pallet-randomness-collective-flip = { workspace = true, features = ["default"] } pallet-timestamp = { workspace = true, features = ["default"] } diff --git a/zrml/court/src/mock.rs b/zrml/court/src/mock.rs index aa4292303..faf63d33f 100644 --- a/zrml/court/src/mock.rs +++ b/zrml/court/src/mock.rs @@ -257,6 +257,9 @@ impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` + let _ = env_logger::builder().is_test(true).try_init(); + pallet_balances::GenesisConfig:: { balances: self.balances } .assimilate_storage(&mut t) .unwrap(); diff --git a/zrml/global-disputes/Cargo.toml b/zrml/global-disputes/Cargo.toml index 450dc0fd0..b513c0707 100644 --- a/zrml/global-disputes/Cargo.toml +++ b/zrml/global-disputes/Cargo.toml @@ -14,6 +14,7 @@ num-traits = { workspace = true, optional = true } [dev-dependencies] +env_logger = { workspace = true } pallet-balances = { workspace = true, features = ["default"] } pallet-timestamp = { workspace = true, features = ["default"] } sp-io = { workspace = true, features = ["default"] } diff --git a/zrml/global-disputes/src/mock.rs b/zrml/global-disputes/src/mock.rs index f8734b2f1..d678cd362 100644 --- a/zrml/global-disputes/src/mock.rs +++ b/zrml/global-disputes/src/mock.rs @@ -199,6 +199,9 @@ impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` + let _ = env_logger::builder().is_test(true).try_init(); + pallet_balances::GenesisConfig:: { balances: self.balances } .assimilate_storage(&mut t) .unwrap(); diff --git a/zrml/liquidity-mining/Cargo.toml b/zrml/liquidity-mining/Cargo.toml index e394c4dd4..3d50e0075 100644 --- a/zrml/liquidity-mining/Cargo.toml +++ b/zrml/liquidity-mining/Cargo.toml @@ -10,6 +10,7 @@ zeitgeist-primitives = { workspace = true } zrml-market-commons = { workspace = true } [dev-dependencies] +env_logger = { workspace = true } pallet-balances = { workspace = true, features = ["default"] } pallet-timestamp = { workspace = true, features = ["default"] } sp-io = { workspace = true, features = ["default"] } diff --git a/zrml/liquidity-mining/src/mock.rs b/zrml/liquidity-mining/src/mock.rs index 22a76d3e3..a85e574ce 100644 --- a/zrml/liquidity-mining/src/mock.rs +++ b/zrml/liquidity-mining/src/mock.rs @@ -138,6 +138,9 @@ impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` + let _ = env_logger::builder().is_test(true).try_init(); + crate::GenesisConfig:: { initial_balance: self.initial_balance, per_block_distribution: self.per_block_incentives, diff --git a/zrml/market-commons/Cargo.toml b/zrml/market-commons/Cargo.toml index d26c4e86b..8321bc159 100644 --- a/zrml/market-commons/Cargo.toml +++ b/zrml/market-commons/Cargo.toml @@ -8,6 +8,7 @@ sp-runtime = { workspace = true } zeitgeist-primitives = { workspace = true } [dev-dependencies] +env_logger = { workspace = true } pallet-balances = { workspace = true, features = ["default"] } pallet-timestamp = { workspace = true, features = ["default"] } sp-io = { workspace = true, features = ["default"] } diff --git a/zrml/market-commons/src/mock.rs b/zrml/market-commons/src/mock.rs index 89eebf8b1..e0a89f972 100644 --- a/zrml/market-commons/src/mock.rs +++ b/zrml/market-commons/src/mock.rs @@ -106,6 +106,9 @@ impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` + let _ = env_logger::builder().is_test(true).try_init(); + pallet_balances::GenesisConfig:: { balances: vec![] } .assimilate_storage(&mut t) .unwrap(); diff --git a/zrml/neo-swaps/Cargo.toml b/zrml/neo-swaps/Cargo.toml index d0b87d52f..6d41495cd 100644 --- a/zrml/neo-swaps/Cargo.toml +++ b/zrml/neo-swaps/Cargo.toml @@ -14,6 +14,7 @@ zrml-market-commons = { workspace = true } # Mock +env_logger = { workspace = true, optional = true } orml-asset-registry = { workspace = true, optional = true } orml-currencies = { workspace = true, optional = true } orml-tokens = { workspace = true, optional = true } @@ -38,7 +39,6 @@ zrml-rikiddo = { workspace = true, optional = true } zrml-simple-disputes = { workspace = true, optional = true } zrml-swaps = { workspace = true, optional = true } - [dev-dependencies] more-asserts = { workspace = true } test-case = { workspace = true } @@ -77,6 +77,7 @@ mock = [ "zrml-prediction-markets/mock", "zrml-prediction-markets/default", "serde/default", + "env_logger/default", ] parachain = ["zrml-prediction-markets/parachain"] runtime-benchmarks = [ diff --git a/zrml/neo-swaps/src/mock.rs b/zrml/neo-swaps/src/mock.rs index 9a443e5b5..96f0c5b2d 100644 --- a/zrml/neo-swaps/src/mock.rs +++ b/zrml/neo-swaps/src/mock.rs @@ -480,6 +480,8 @@ impl Default for ExtBuilder { impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` + let _ = env_logger::builder().is_test(true).try_init(); pallet_balances::GenesisConfig:: { balances: self.balances } .assimilate_storage(&mut t) .unwrap(); diff --git a/zrml/orderbook/Cargo.toml b/zrml/orderbook/Cargo.toml index f914b3d84..8a821e922 100644 --- a/zrml/orderbook/Cargo.toml +++ b/zrml/orderbook/Cargo.toml @@ -10,6 +10,7 @@ sp-runtime = { workspace = true } zeitgeist-primitives = { workspace = true } # Mock +env_logger = { workspace = true, optional = true } orml-currencies = { workspace = true, optional = true } orml-tokens = { workspace = true, optional = true } pallet-balances = { workspace = true, optional = true } @@ -31,6 +32,7 @@ mock = [ "orml-currencies/default", "sp-io/default", "zeitgeist-primitives/mock", + "env_logger/default", ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", diff --git a/zrml/orderbook/src/mock.rs b/zrml/orderbook/src/mock.rs index 2384c3ab9..a5af9c621 100644 --- a/zrml/orderbook/src/mock.rs +++ b/zrml/orderbook/src/mock.rs @@ -150,6 +150,9 @@ impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` + let _ = env_logger::builder().is_test(true).try_init(); + pallet_balances::GenesisConfig:: { balances: self.balances } .assimilate_storage(&mut t) .unwrap(); diff --git a/zrml/parimutuel/Cargo.toml b/zrml/parimutuel/Cargo.toml index dae19e657..422361dbf 100644 --- a/zrml/parimutuel/Cargo.toml +++ b/zrml/parimutuel/Cargo.toml @@ -10,6 +10,7 @@ zeitgeist-primitives = { workspace = true } zrml-market-commons = { workspace = true } [dev-dependencies] +env_logger = { workspace = true } orml-currencies = { workspace = true, features = ["default"] } orml-tokens = { workspace = true, features = ["default"] } pallet-balances = { workspace = true, features = ["default"] } diff --git a/zrml/parimutuel/src/mock.rs b/zrml/parimutuel/src/mock.rs index c04387509..4cb7da5d1 100644 --- a/zrml/parimutuel/src/mock.rs +++ b/zrml/parimutuel/src/mock.rs @@ -199,6 +199,9 @@ impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` + let _ = env_logger::builder().is_test(true).try_init(); + pallet_balances::GenesisConfig:: { balances: self.balances } .assimilate_storage(&mut t) .unwrap(); diff --git a/zrml/prediction-markets/Cargo.toml b/zrml/prediction-markets/Cargo.toml index 3ce92c2f8..8cbb47232 100644 --- a/zrml/prediction-markets/Cargo.toml +++ b/zrml/prediction-markets/Cargo.toml @@ -18,6 +18,7 @@ zrml-simple-disputes = { workspace = true } # Mock +env_logger = { workspace = true, optional = true } orml-asset-registry = { workspace = true, optional = true } orml-currencies = { workspace = true, optional = true } orml-tokens = { workspace = true, optional = true } @@ -57,6 +58,7 @@ mock = [ "zrml-swaps/default", "xcm/default", "orml-asset-registry/default", + "env_logger/default", ] parachain = [] runtime-benchmarks = [ diff --git a/zrml/prediction-markets/src/mock.rs b/zrml/prediction-markets/src/mock.rs index 8a448a1ec..c9eea71b3 100644 --- a/zrml/prediction-markets/src/mock.rs +++ b/zrml/prediction-markets/src/mock.rs @@ -480,6 +480,9 @@ impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` + let _ = env_logger::builder().is_test(true).try_init(); + pallet_balances::GenesisConfig:: { balances: self.balances } .assimilate_storage(&mut t) .unwrap(); diff --git a/zrml/rikiddo/Cargo.toml b/zrml/rikiddo/Cargo.toml index 8e010ffd8..e3158e353 100644 --- a/zrml/rikiddo/Cargo.toml +++ b/zrml/rikiddo/Cargo.toml @@ -1,6 +1,7 @@ [dependencies] arbitrary = { workspace = true, features = ["derive"], optional = true } cfg-if = { workspace = true } +env_logger = { workspace = true, optional = true } frame-support = { workspace = true } frame-system = { workspace = true } hashbrown = { workspace = true } @@ -24,6 +25,7 @@ mock = [ "pallet-timestamp/default", "sp-io/default", "zeitgeist-primitives/mock", + "env_logger/default", ] std = [ "frame-support/std", diff --git a/zrml/rikiddo/src/mock.rs b/zrml/rikiddo/src/mock.rs index 07d089867..970a89d40 100644 --- a/zrml/rikiddo/src/mock.rs +++ b/zrml/rikiddo/src/mock.rs @@ -1,3 +1,4 @@ +// Copyright 2023 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -148,6 +149,9 @@ impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` + let _ = env_logger::builder().is_test(true).try_init(); + pallet_balances::GenesisConfig:: { balances: self.balances } .assimilate_storage(&mut t) .unwrap(); diff --git a/zrml/simple-disputes/Cargo.toml b/zrml/simple-disputes/Cargo.toml index aaef49233..1054899b7 100644 --- a/zrml/simple-disputes/Cargo.toml +++ b/zrml/simple-disputes/Cargo.toml @@ -10,6 +10,7 @@ zeitgeist-primitives = { workspace = true } zrml-market-commons = { workspace = true } [dev-dependencies] +env_logger = { workspace = true } orml-currencies = { workspace = true, features = ["default"] } orml-tokens = { workspace = true, features = ["default"] } pallet-balances = { workspace = true, features = ["default"] } diff --git a/zrml/simple-disputes/src/mock.rs b/zrml/simple-disputes/src/mock.rs index 3f3e3dee7..ef8643982 100644 --- a/zrml/simple-disputes/src/mock.rs +++ b/zrml/simple-disputes/src/mock.rs @@ -220,6 +220,9 @@ impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` + let _ = env_logger::builder().is_test(true).try_init(); + pallet_balances::GenesisConfig:: { balances: self.balances } .assimilate_storage(&mut t) .unwrap(); diff --git a/zrml/styx/Cargo.toml b/zrml/styx/Cargo.toml index d43ee274d..44edbd03f 100644 --- a/zrml/styx/Cargo.toml +++ b/zrml/styx/Cargo.toml @@ -8,6 +8,7 @@ sp-runtime = { workspace = true } zeitgeist-primitives = { workspace = true } [dev-dependencies] +env_logger = { workspace = true } pallet-balances = { workspace = true, features = ["default"] } pallet-timestamp = { workspace = true, features = ["default"] } sp-io = { workspace = true, features = ["default"] } diff --git a/zrml/styx/src/mock.rs b/zrml/styx/src/mock.rs index 80dd2a2f8..263c25712 100644 --- a/zrml/styx/src/mock.rs +++ b/zrml/styx/src/mock.rs @@ -1,3 +1,4 @@ +// Copyright 2023 Forecasting Technologies LTD. // Copyright 2021-2022 Zeitgeist PM LLC. // // This file is part of Zeitgeist. @@ -111,6 +112,9 @@ impl ExtBuilder { pub fn build(self) -> sp_io::TestExternalities { let mut t = frame_system::GenesisConfig::default().build_storage::().unwrap(); + // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` + let _ = env_logger::builder().is_test(true).try_init(); + pallet_balances::GenesisConfig:: { balances: self.balances } .assimilate_storage(&mut t) .unwrap(); diff --git a/zrml/swaps/Cargo.toml b/zrml/swaps/Cargo.toml index 9eb5df1f7..298a9fe34 100644 --- a/zrml/swaps/Cargo.toml +++ b/zrml/swaps/Cargo.toml @@ -14,6 +14,7 @@ zrml-rikiddo = { workspace = true } # Mock +env_logger = { workspace = true, optional = true } orml-currencies = { workspace = true, optional = true } orml-tokens = { workspace = true, optional = true } pallet-balances = { workspace = true, optional = true } @@ -40,6 +41,7 @@ mock = [ "zeitgeist-primitives/mock", "zrml-market-commons/default", "zrml-swaps-runtime-api/default", + "env_logger/default", ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", diff --git a/zrml/swaps/src/mock.rs b/zrml/swaps/src/mock.rs index 948a8ce5f..85f8ba551 100644 --- a/zrml/swaps/src/mock.rs +++ b/zrml/swaps/src/mock.rs @@ -283,6 +283,9 @@ impl ExtBuilder { let mut storage = frame_system::GenesisConfig::default().build_storage::().unwrap(); + // see the logs in tests when using `RUST_LOG=debug cargo test -- --nocapture` + let _ = env_logger::builder().is_test(true).try_init(); + pallet_balances::GenesisConfig:: { balances: self.balances } .assimilate_storage(&mut storage) .unwrap();