58870fc6d3
## Issue Addressed Fix #2585 ## Proposed Changes Provide a canonical version of test_logger that can be used throughout lighthouse. ## Additional Info This allows tests to conditionally emit logging data by adding test_logger as the default logger. And then when executing `cargo test --features logging/test_logger` log output will be visible: wink@3900x:~/lighthouse/common/logging/tests/test-feature-test_logger (Add-test_logger-as-feature-to-logging) $ cargo test --features logging/test_logger Finished test [unoptimized + debuginfo] target(s) in 0.02s Running unittests (target/debug/deps/test_logger-e20115db6a5e3714) running 1 test Sep 10 12:53:45.212 INFO hi, module: test_logger:8 test tests::test_fn_with_logging ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Doc-tests test-logger running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Or, in normal scenarios where logging isn't needed, executing `cargo test` the log output will not be visible: wink@3900x:~/lighthouse/common/logging/tests/test-feature-test_logger (Add-test_logger-as-feature-to-logging) $ cargo test Finished test [unoptimized + debuginfo] target(s) in 0.02s Running unittests (target/debug/deps/test_logger-02e02f8d41e8cf8a) running 1 test test tests::test_fn_with_logging ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s Doc-tests test-logger running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
93 lines
2.2 KiB
TOML
93 lines
2.2 KiB
TOML
[workspace]
|
|
members = [
|
|
"account_manager",
|
|
|
|
"beacon_node",
|
|
"beacon_node/beacon_chain",
|
|
"beacon_node/client",
|
|
"beacon_node/eth1",
|
|
"beacon_node/eth2_libp2p",
|
|
"beacon_node/http_api",
|
|
"beacon_node/http_metrics",
|
|
"beacon_node/network",
|
|
"beacon_node/store",
|
|
"beacon_node/timer",
|
|
|
|
"boot_node",
|
|
|
|
"common/account_utils",
|
|
"common/clap_utils",
|
|
"common/compare_fields",
|
|
"common/compare_fields_derive",
|
|
"common/deposit_contract",
|
|
"common/directory",
|
|
"common/eth2",
|
|
"common/eth2_config",
|
|
"common/eth2_interop_keypairs",
|
|
"common/eth2_network_config",
|
|
"common/eth2_wallet_manager",
|
|
"common/hashset_delay",
|
|
"common/lighthouse_metrics",
|
|
"common/lighthouse_version",
|
|
"common/lockfile",
|
|
"common/logging",
|
|
"common/lru_cache",
|
|
"common/malloc_utils",
|
|
"common/sensitive_url",
|
|
"common/slot_clock",
|
|
"common/task_executor",
|
|
"common/target_check",
|
|
"common/test_random_derive",
|
|
"common/validator_dir",
|
|
"common/warp_utils",
|
|
"common/fallback",
|
|
"common/monitoring_api",
|
|
|
|
"consensus/cached_tree_hash",
|
|
"consensus/int_to_bytes",
|
|
"consensus/fork_choice",
|
|
"consensus/proto_array",
|
|
"consensus/safe_arith",
|
|
"consensus/ssz",
|
|
"consensus/ssz_derive",
|
|
"consensus/ssz_types",
|
|
"consensus/serde_utils",
|
|
"consensus/state_processing",
|
|
"consensus/swap_or_not_shuffle",
|
|
"consensus/tree_hash",
|
|
"consensus/tree_hash_derive",
|
|
|
|
"crypto/bls",
|
|
"crypto/eth2_hashing",
|
|
"crypto/eth2_key_derivation",
|
|
"crypto/eth2_keystore",
|
|
"crypto/eth2_wallet",
|
|
|
|
"lcli",
|
|
|
|
"lighthouse",
|
|
"lighthouse/environment",
|
|
|
|
"slasher",
|
|
"slasher/service",
|
|
|
|
"testing/ef_tests",
|
|
"testing/eth1_test_rig",
|
|
"testing/node_test_rig",
|
|
"testing/simulator",
|
|
"testing/test-test_logger",
|
|
"testing/state_transition_vectors",
|
|
"testing/web3signer_tests",
|
|
|
|
"validator_client",
|
|
"validator_client/slashing_protection",
|
|
]
|
|
|
|
[patch]
|
|
[patch.crates-io]
|
|
eth2_ssz = { path = "consensus/ssz" }
|
|
eth2_ssz_types = { path = "consensus/ssz_types" }
|
|
eth2_ssz_derive = { path = "consensus/ssz_derive" }
|
|
tree_hash = { path = "consensus/tree_hash" }
|
|
tree_hash_derive = { path = "consensus/tree_hash_derive" }
|