mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-16 03:12:41 +00:00
simulator: Write dependency logs to separate files (#7433)
This PR relates to: - https://github.com/sigp/lighthouse/pull/7199 - -> workspace_filter has been enabled (dependency logging has been disabled) - https://github.com/sigp/lighthouse/pull/7394 - -> file logging has been optionally enabled Building on these, this PR enables dependency logging for the simulators. The logs are written to separate files. The libp2p/discv5 logs: - are saved to the directory specified with `--log-dir` - respects the `RUST_LOG` environment variable for log level configuration
This commit is contained in:
@@ -29,15 +29,15 @@ fn main() {
|
||||
Builder::from_env(Env::default()).init();
|
||||
|
||||
let matches = cli_app().get_matches();
|
||||
match matches.subcommand() {
|
||||
Some(("basic-sim", matches)) => match basic_sim::run_basic_sim(matches) {
|
||||
match matches.subcommand_name() {
|
||||
Some("basic-sim") => match basic_sim::run_basic_sim(&matches) {
|
||||
Ok(()) => println!("Simulation exited successfully"),
|
||||
Err(e) => {
|
||||
eprintln!("Simulation exited with error: {}", e);
|
||||
std::process::exit(1)
|
||||
}
|
||||
},
|
||||
Some(("fallback-sim", matches)) => match fallback_sim::run_fallback_sim(matches) {
|
||||
Some("fallback-sim") => match fallback_sim::run_fallback_sim(&matches) {
|
||||
Ok(()) => println!("Simulation exited successfully"),
|
||||
Err(e) => {
|
||||
eprintln!("Simulation exited with error: {}", e);
|
||||
|
||||
Reference in New Issue
Block a user