simulator: Fix Failed to initialize dependency logging (#7393)

The simulator works but always emits the following message:

```
$ cargo run --release --bin simulator basic-sim
...
...
Failed to initialize dependency logging: attempted to set a logger after the logging system was already initialized
...
...
```


  This PR removes the initialization with `env_logger`.

(Update)
With https://github.com/sigp/lighthouse/pull/7433 merged, the libp2p/discv5 logs are saved in separate files and respect the `RUST_LOG` env var for log level configuration.
This commit is contained in:
Akihito Nakano
2025-05-30 12:05:37 +09:00
committed by GitHub
parent 4d21846aba
commit 39744df93f
3 changed files with 0 additions and 8 deletions

2
Cargo.lock generated
View File

@@ -8469,9 +8469,7 @@ name = "simulator"
version = "0.2.0"
dependencies = [
"clap",
"env_logger 0.9.3",
"environment",
"eth2_network_config",
"execution_layer",
"futures",
"kzg",

View File

@@ -7,9 +7,7 @@ edition = { workspace = true }
[dependencies]
clap = { workspace = true }
env_logger = { workspace = true }
environment = { workspace = true }
eth2_network_config = { workspace = true }
execution_layer = { workspace = true }
futures = { workspace = true }
kzg = { workspace = true }

View File

@@ -18,16 +18,12 @@ mod local_network;
mod retry;
use cli::cli_app;
use env_logger::{Builder, Env};
use local_network::LocalNetwork;
use types::MinimalEthSpec;
pub type E = MinimalEthSpec;
fn main() {
// Debugging output for libp2p and external crates.
Builder::from_env(Env::default()).init();
let matches = cli_app().get_matches();
match matches.subcommand_name() {
Some("basic-sim") => match basic_sim::run_basic_sim(&matches) {